Saturday, May 19, 2012

ASP.NET charting – Google Chart API

November 3, 2009 by · Leave a Comment 

Is charting a probelm in ASP.NET, try Google chart API, its free and robust. Following is the link to a very good article giving every bit of information on the above topic ASP.NET Charting with Google Chart API

displaying an image for error message in ASP.NET validator control

November 3, 2009 by · Leave a Comment 

There are many instances when user wants to see interactive and elegant images in their websites, either they look at any of the controls, or the whole page itself. In ASP.NET validator controls, mostly it is seen that "*" is placed when an error has occured. Can we add some image to display when an [...]

How to validate ReCAPTCHA.

November 3, 2009 by · 7 Comments 

There are some cases when a user want to validate a CAPTCHA and perform some activity on its results. ReCAPTCHA gives an .NET API to perform some operations on its CAPTCHA component. Following is the code to validate a CAPTCHA on server side. ASPX Markup: <!– Start ReCAPTCHA –> <span class="orangetext">Captcha Verification:</span> <recaptcha:RecaptchaControl ID="recaptcha" runat="server" [...]

Service Unavailable – Error message

November 3, 2009 by · Leave a Comment 

When you configure your IIS webserver and find the following message Service Unavailable Then the first solution to the above error is http://support.microsoft.com/default.aspx?id=823552 but if this does not solve the problem try doing the following stuff. Open the IIS Manager, right click Web Sites and select properties:                 [...]

Enable/Disable DIV tags through Javascript

November 3, 2009 by · Leave a Comment 

Copy/Paste following javascript code snippet. <script type="text/javascript"> function toggleAlert() { toggleDisabled(document.getElementById("content")); } function toggleDisabled(el) { try { el.disabled = el.disabled ? false : true; } catch(E){ } if (el.childNodes && el.childNodes.length > 0) { for (var x = 0; x < el.childNodes.length; x++) { toggleDisabled(el.childNodes[x]); } } } </script> Copy/Paste following HTML code in BODY [...]

ASP.NET Caching -Improving Performance – Output Cache

November 1, 2009 by · Leave a Comment 

What is Output Cache? Output cache is a mechanism that keep a copy of a rendered ASP.NET web page in memory. This behavior helps to improve performance by returning a response of the cached web page instantly and by reducing the need to render the page in every client request. If a page takes a [...]

Passing Querystring Parameters to a Silverlight Control

November 1, 2009 by · Leave a Comment 

The approach to passing Querystring parameters to a Silverlight 2.0 Control that works for me is pretty simple. We check for the presence of Querystrings in the app.xaml Application_Startup using the Silverlight HTML Bridge and pass those values to the page’s constructor. APP.XAML ——————————– private void Application_Startup(object sender, StartupEventArgs e) { int fid = HtmlPage.Document.QueryString["fid"] [...]

ASP.NET Custom Control Lifecycle

November 1, 2009 by · Leave a Comment 

I always forget the lifecycle of custom server control classes with respect to web page, ie. aspx file. The following results are based on a drop down list custom control: customcontrol – Constructor customcontrol – OnInit – Enter customcontrol – OnInit – Exit webpage – OnInit – Enter webpage – OnInit – Exit webpage – [...]

Row already belongs to another table

November 1, 2009 by · Leave a Comment 

When copying a row from one datatable to another you might get the error "this row already belongs to another table". Typically you might write code like this: string sConnString = ConfigurationManager.ConnectionStrings["NorthwindConn"].ConnectionString; DataSet ds = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(sConnString,CommandType.Text, "select * from suppliers order by supplierid"); int nRowCount = 0; DataTable dt = ds.Tables[0];DataTable dt2 = dt.Clone(); dt2.Clear(); [...]

AJAX Tab Container – Style Problem

November 1, 2009 by · 3 Comments 

Cause Since the release of ASP.Net 2.0, all the pages’ DTD are set to XHTML 1.0 Transitional by default. Consequently, AJAX Control Toolkits were also created to adhere with standard. All the rendered AJAX controls will follow the said document type definition. As it turns out, our page only adhere to HTML 4.01 Transitional DTD [...]