if(grid_view_employee_details.Rows.Count>0) { //rows present } else { //rows do not present }
docoment.getElementById('<%=txt_salary.ClientID%>').style.display = 'none';
protected void Page_Load(object sender, EventArgs e) { Control myCtrl = null; myCtrl = Page.LoadControl("~/UserControls/UcTeamControl.ascx"); Page.Controls.Add(myCtrl); }
<asp:DropDownList ID="ddl_employee_name" runat="server" OnSelectedIndexChanged="ddl_employee_name_SelectedIndexChanged" AutoPostBack="true" ></asp:DropDownList> <asp:TextBox ID="txt_employee_pan_no" runat="server" AutoPostBack="true" OnTextChanged ="txt_employee_pan_no_TextChanged"></asp:TextBox>
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } }
if(fld_upload.HasFile) { //it contains file } else { //it does not contain any file }
Session["Name"] = "Vishal";
Session("Name") = "Vishal";
string name = string.Empty; if (Session["Name"] != null) { name = Convert.ToString(Session["Name"]); }
Dim name As String = String.Empty If (Not Session("Name") Is Nothing) Then name = Convert.ToString(Session("Name")) End If
Session["Name"] = "Vishal"; Session["Mail_Id"] = "vish@xyx.com"; Session.Clear();
Session.Add("Name", "Vishal"); Session.Add("Email_Id", "vish@abc.co.in");
Session.Add("Name", "Vishal"); Session.Add("Email_Id", "vish@abc.com"); Session.Add("Ph-No", "1234567890"); Session.RemoveAt(1);
int session_count = Convert.ToInt32(Session.Count);
if (Page.IsValid) { }
ViewState.Add("Name", "Vishal");