Entries Categorized as 'asp.net'
July 1, 2008
I have a method that handles sending of emails. I wrote it so that it would run asynchronously, so that it won’t slow down the web app. It looks like this:
protected static void SendMail(string to, string subject, string body)
{
try
{
using […]
Posted in .net, asp.net, asp.net mvc
1 Comment »
April 13, 2008
Yesterday, I gave a talk at CMAP Code Camp about the asp.net mvc framework and AJAX using JQuery. This is my first time speaking, so I was a little nervous. I think I did ok but I can’t really tell. Of course, the talk didn’t go as planned, because Visual Studio didn’t […]
Posted in AJAX, asp.net, asp.net mvc
2 Comments »
Tags: AJAX, asp.net, cmap, codecamp, jquery, mvc, talks
April 11, 2008
[update: Yonkly source code is now public]
Asp.net MVC framework rocks. I wanted to play with it more and decided why not build an open source twitter. Unfortunately, I couldn’t come up with a better name for it that had an available domain so Yonkly it is. Come to think of it Yonkly […]
Posted in asp.net, asp.net mvc, yonkly
22 Comments »
Tags: asp.net, mvc, projects, yonkly
April 10, 2008
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 […]
Posted in Tips & Tricks, asp.net, asp.net mvc
4 Comments »
Tags: asp.net, mvc, tips, url rewriting
April 4, 2008
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 controller. […]
Posted in .net, LINQ, Testing, asp.net, asp.net mvc
3 Comments »
Tags: asp.net, LINQ, mocking, moq, mvc, Testing, unit testing
March 31, 2008
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 […]
Posted in .net, AJAX, Programming, Web Dev, asp.net
4 Comments »
Tags: AJAX, asp.net, code, mvc
August 4, 2007
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″ […]
Posted in AJAX, Web Dev, asp.net
1 Comment »
May 22, 2007
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” />
<asp:BoundField DataField=”Status” HeaderText=”Status” […]
Posted in .net, Web Dev, asp.net
No Comments »