A A
RSS

Tag Archive | "ASP.NET"

Tricky Asp.net MVC URL Rewriting

Thursday, April 10, 2008

View Comments

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 [...]

Unit Test Linq to Sql in ASP.Net MVC with Moq

Friday, April 4, 2008

View Comments

I have just spent the entire day playing with Moq to unit test an asp.net mvc application I am working with. All I wanted to do is test a “create” method that simply adds a record to the database. So here it goes. 1. I created a Mock Http context to be used by my [...]

Ajax with ASP.NET MVC Framework Preview 2

Monday, March 31, 2008

View Comments

This is the updated version of the Nikhil’s excellent example on how to use Ajax with ASP.net MVC. I commented all the changes made in the code and prefixed them with //emad. So just search for //emad and you will see all the changes I made… Here is a quick list of the changes I [...]

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

Saturday, August 4, 2007

View Comments

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: <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="pnlNewUser" DisplayAfter="0" DynamicLayout="True"> <ProgressTemplate> [...]

DataFormatString not working with date format in GridView

Tuesday, May 22, 2007

Comments Off

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” /> [...]

.net AJAX ASP.NET ASP.NET MVC aspnetmvc Blogging Books C# database di Funny Interesting ioc iPhone jquery Lifestyle LINQ Mac mvc mvcbook MVC Book ninject Open Source php Productivity Programming Random ror ruby Silverlight Software SQL Startup tdd Testing tips Tips & Tricks Uncategorized vb.net Video Visual Studio Web Design Web Dev wordpress Yonkly
Advertise Here

What I'm Doing...

Recent Posts

Yonkly Open Source

Sign up for my newsletter




* = required field

powered by MailChimp!

megree Widget

Apparently, I am connected to Obama. Check this out...
My path to Obama

Cyber Identity