Blog Archives

Best way to Parse Query String value in Asp.Net

Best way to parse query string value in Asp.Net //Use it string cityCode = Request.QueryString.GetValue<string>(“City”); //Extension method public static T GetValue<T>(this NameValueCollection collection, string key)         {             if (collection == null)             {                 throw new ArgumentNullException(“collection”);             }

Tagged with: ,
Posted in .Net, Asp.Net, C#

Export MS Chart to PDF using Itextsharp in Asp.Net

Export MS Chart to PDF in Asp.Net Using itextsharp, export ms chart into pdf file I am rendering a chart using chart control in asp.Net 4.0. Now we want to export that chart image into pdf file. Interesting point is,

Tagged with: , , , ,
Posted in .Net, Asp.Net, C#, ms Chart

Bar Chart random color in asp.Net

Display bars in random colors: IDictionary<string, int> list= new Dictionary<string, int>(); list.Add(“Val 1”, 90); list.Add(“Val  2”, 89); list.Add(“Val 3”, 50); list.Add(“Val 5”, 87); chrtBar2.Series[“Categories”].XValueMember = “key”; chrtBar2.Series[“Categories”].YValueMembers = “value”; chrtBar2.ChartAreas[“MainChartArea”].AxisX.MajorGrid.Enabled = false; chrtBar2.ChartAreas[“MainChartArea”].AxisX.MajorTickMark.Enabled = true; chrtBar2.ChartAreas[“MainChartArea”].AxisX.MinorGrid.Enabled = false; chrtBar2.ChartAreas[“MainChartArea”].AxisX.MinorTickMark.Enabled =

Tagged with: , , ,
Posted in .Net, Asp.Net, C#

RadioButtonList change event in jquery

Trap RedioButtonList change event in Jqury OR RadioButtonList selected value in Jquery: <asp:RadioButtonList ID=”rblBannerType” ClientIDMode=”Static” runat=”server”  RepeatDirection=”Horizontal” > <asp:ListItem Value=”image” Selected=”True”>Image</asp:ListItem> <asp:ListItem Text=”html” >Html</asp:ListItem> </asp:RadioButtonList>  //jquery script <script> $(function () { var t = $(“#rblBannerType input:checked”).val(); SetBannerType(t); //Banner Type $(“#rblBannerType”).change(function () { var type = $(“#rblBannerType input:checked”).val(); SetBannerType(type); }); }); function SetBannerType(type) { if (type == “image”) { $(“#divImage”).show(); $(“#divHtml”).hide(); } else { $(“#divHtml”).show(); $(“#divImage”).hide(); } } </script>

Tagged with: ,
Posted in Asp.Net, C#

Abstract Class Interview Questions

–         The abstract modifier can be used with classes, methods, properties, indexers, and events –         An abstract class cannot be instantiated –         It is an error to use the static or virtual modifiers in an abstract method declaration. –         An

Tagged with: , , ,
Posted in .Net, Asp.Net, C#

Class Constructors Interview questions

This is my first post about the C# Interview questions. I will try to cover here core concept of C# language (.Net2.0) and try to touch each and every areas which is asking in interviews. What is the Constructors? –

Tagged with: , , , ,
Posted in .Net, C#

CA0052 : No targets were selected

CA0052 : No targets were selected When we are going to integrate FxCop with our Visual Studio then we getting very frequently above said error. Cause: FxCop not configured correctly Resolution: follow the below steps-   1- Go to Tools ->

Tagged with: , ,
Posted in .Net, Asp.Net, C#, FxCop,
Top Rated

Error: Please make sure the Twitter account is public.

Blog Stats
  • 30,874 hits