ASP.NET

Tricky Asp.net MVC URL Rewriting

I am working on an asp.net mvc application and I wanted to make the user’s main page (profile) be www.domain.com/username.  This is a problem because the routing engine in MVC treats the first item after the domain as a controller.  Ofcourse I could do a {*catchall} and do my own parsing but why re-invent the(…)

ASP.NET AJAX: Rendering a Gmail-like ‘Loading’ Indicator

Here is an interesting article on how to display Gmail-like progress indicator: Matt Berseth: ASP.NET AJAX: Rendering a Gmail-like ‘Loading’ Indicator over a Specific ASP.NET Control But I have a much easier method to do that, which I use in www.yongazonga.com: First, add your UpdateProgress control like this:

And then apply this style to(…)

DataFormatString not working with date format in GridView

I set the DataFormatString to {0:d} and also tried {0:MM-dd-yyyy} as several forums and articles suggested; but it still wouldn’t work and kept on displaying the entire string including the time. It turns out, all I had to do is add HtmlEncode=”false”. <asp:GridView ID=”gridItems” runat=”server” AutoGenerateColumns=”False” DataKeyNames=”ItemId” DataSourceID=”MyItemsDataSource” Width=”100%”> <Columns> <asp:BoundField DataField=”Title” HeaderText=”Title” SortExpression=”Title” />(…)