1 Comment

with the help of this third party tool we can see the code of a compiled DLL

Only Number validation in Textbox of ASP.NET Using Regular Expression validator


Only numbers can enter into that Textbox

We can use Regular expression validator for this:
In the validation expression property keep ^\d+$.

<asp:TextBox ID="TextBox1" runat="server" Style="z-index: 100; left: 259px; position: absolute;
top: 283px" ValidationGroup="check"></asp:TextBox>

<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1"
ErrorMessage="Please Enter Only Numbers" Style="z-index: 101; left: 424px; position: absolute;
top: 285px" ValidationExpression="^\d+$" ValidationGroup="check"></asp:RegularExpressionValidator>

javascript pop up in


When we click a Linkbutton or Image button it must open a pop up window.below is the code for that you can place in any of the button events

string s = "'popup.aspx',




(this.GetType(), "s", s, true);

Display * marks while registering a page

Leave a comment

(*) All fields are mandatory
By using this concept some websites display the star marks for the compulsory fields
while registering to that same process in we must write the following
code in Page_load event.


Putting select in dropdownlist with sqldatasource control

Leave a comment

<asp:DropDownList ID=”ddl_countries” runat=”server” ValidationGroup=”CHECKS” DataSourceID=”SqlDataSource1″ DataTextField=”Country” DataValueField=”country_id” AppendDataBoundItems=”true” Width=”100px”><asp:ListItem Value=””>Select</asp:ListItem></asp:DropDownList>

CustomValidator for Radio Button

1 Comment

Hai friends here I am writing the code for creating a Custom validator for Radio button.
Please check it out and try.

Write a javascript function in .aspx page

function ValidateRadiobutton(oSrc, args)
if(document.getElementById("").checked ==

false&&document.getElementById("") .checked ==false)
args.IsValid = false;

Add custom validator

ClientValidationFunction="ValidateRadiobutton" runat="server"
ErrorMessage="Select Active/Inactive"
CssClass="ValidationMessage" ValidationGroup="status" Font-Bold="True" ForeColor="Lime">

Any doubts mail me at:

Hello world!

1 Comment

Welcome to This is your first post. Edit or delete it and start blogging!