Decompiler

1 Comment


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

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

170 Comments


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 asp.net

2 Comments


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 = "javascript:pop_window=window.open('popup.aspx',

'pop_window','width=400,height=400,top=50,left=100');

pop_window.focus()";

Page.ClientScript.RegisterClientScriptBlock

(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 asp.net we must write the following
code in Page_load event.

if(!Page.IsPostback)
{
page.validate();
}

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: radhekrsna@gmail.com

Hello world!

1 Comment


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