Category Archives: ASP.Net

Preserving milliseconds when passing dates around front end

2016-06-08 Instead of passing the datetime pass the datetime.Ticks which is a (long) numeric value so the complete datetime value will be preserved. Then convert ticks back to datetime in the server (controller \ action method).

Posted in ASP.Net, ASP.NET MVC, C#.Net, Web Development | Tagged , , , | Leave a comment

Stop asp.net from encoding the source HTML string (mvc raw html)

/// Stops asp.net from encoding the source HTML string. public static IHtmlString HTMLRaw(string source) { return new HtmlString(source); } call this function whenever you want asp.net NOT to encode the string. Note: You can use <%= and %> tags to … Continue reading

Posted in ASP.Net, C#.Net, Microsoft .Net Framework | Tagged | Leave a comment

C# ASP.NET – GridView : How to Use Checkbox in Gridview to Select Multiple Rows

2009-01-06 I wanted to select multiple rows of the grid view using check boxes to select each row. In this post I will discus how and what I did to achieve this goal… I used a template column which holds … Continue reading

Posted in ASP.Net, C#.Net | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

ASP.NET – AutoPostBack : What is AutoPostBack and How AutoPostBack Works

2008-12-26 Today I was experimenting on a grid view where I was trying to select multiple rows of the grid view using a check box column. I wrote some code in the CheckedChanged of checkbox but then I found that … Continue reading

Posted in ASP.Net, C#.Net | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

C# ASP.NET – GridView : How to Keep Modified Data of Template Fields when Paging is Enabled?

2008-12-04 Today I had to take care of a problem of a certain company (CIS) that I consult. They had a problem of keeping the values modified in a template field of a gridview when the user moves from one … Continue reading

Posted in ASP.Net, C#.Net | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment