Rounded off total income Int32 roundedAmt; Int32 torounded = Convert.ToInt32(lblTotalIncome.Text); int lastdigit = torounded % 10; if (lastdigit >= 5) { roundedAmt = torounded - lastdigit + 10; } else { roundedAmt = torounded - lastdigit; } lblRoundedOf.Text...
Thursday, October 21, 2010
Monday, October 11, 2010
Enable and disable textbox when checked the checkbox
Here code show how enable and disble textbox when user checked the textbox.code disble the row which contain the textbox.you can also take only checkboxto enable and disble not neccessary to disble row.function showHide(){ var chkSignature = document.getElementById('ctl00_ContentPlaceHolder1_tabContainer_pnl_chkSign'); var trsign = document.getElementById('ctl00_ContentPlaceHolder1_tabContainer_pnl_trsign');...
Sunday, October 10, 2010
Bind DropDownList using SqlDataReader
This code pulling out data from a database into a data reader is as follows. protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { bindDDL(); } } Public void bindDDL() { SqlConnection con =new SqlConnection(ConfigurationManager. ConnectionStrings["ConnectionString"].ConnectionString.ToString();)...
Saturday, October 9, 2010
Get duplicated record from sql server table
Here query describes how to find duplicate record from a table in sql serverSELECT User_ID FROM tbl_MemberGROUP BY User_IDHAVING count( * ) > 1Thanks & RegardsSantosh Si...
Friday, October 1, 2010
Refresh the aspx page automatically
This small code refresh the aspx page automatically.Set the time according to your requirment in content="time in sec".<head runat="server"> <title>Untitled Page</title> <meta http-equiv="refresh" content="20" /> </head&...