Getting system Timezones in different languages

Changing the CurrentCulture doesn’t work as the information comes from the registry (XP) or from the Multilingual User Interface (MUI) DLL (Vista, Windows 7). On Vista or Windows 7, you may install other languages and change the display language (Region and Language -> Keyboards and languages -> Display language). A reboot is required. This, and … Read more

Pass a user defined object to ASP.NET Webmethod from jQuery, using JSON

I quickly set up this project and I was able to successfully call my web method, please adjust your code accordingly. Make sure your class property names are the same as the ones that you pass through JavaScript. Webservice public static Contact getContact(Contact cnt) { cnt.name = “Abijeet Patro”; cnt.phone = “Blah Blah”; return cnt; … Read more

How does Html.Raw MVC helper work?

Because encoded characters are HTML, and the Raw version of that string is the encoded one. Html.Raw renders what it is given without doing any html encoding, so with ViewBag.div = “<div> Hello </div>”;: @Html.Raw(ViewBag.div); Renders <div> Hello </div> However, when you have encoded characters in there, such as ViewBag.Something = “&gt;”; the raw version … Read more

What is a Generic Handler in asp.net and its use?

Generic handlers are the .NET components that implement the System.Web.IHttpHandler interface. Any class that implements the IHttpHandler interface can act as a target for the incoming HTTP requests. Page is also generic handler. In general generic handlers have an extension of ASHX. You can find example here

Response.Redirect which POSTs data to another URL in ASP.NET

you can send huge data also with this trick.. Response.Clear(); StringBuilder sb = new StringBuilder(); sb.Append(“<html>”); sb.AppendFormat(@”<body onload=’document.forms[“”form””].submit()’>”); sb.AppendFormat(“<form name=”form” action='{0}’ method=’post’>”,postbackUrl); sb.AppendFormat(“<input type=”hidden” name=”id” value=”{0}”>”, id); // Other params go here sb.Append(“</form>”); sb.Append(“</body>”); sb.Append(“</html>”); Response.Write(sb.ToString()); Response.End();

How do I install and use the ASP.NET AJAX Control Toolkit in my .NET 3.5 web applications?

Install the ASP.NET AJAX Control Toolkit Download the ZIP file AjaxControlToolkit-Framework3.5SP1-DllOnly.zip from the ASP.NET AJAX Control Toolkit Releases page of the CodePlex web site. Copy the contents of this zip file directly into the bin directory of your web site. Update web.config Put this in your web.config under the <controls> section: <?xml version=”1.0″?> <configuration> … … Read more