Hello to all,
I have an asp.net web application.In that i have a form,In the form I have
1.) 4 Text box
2.) two combo box
3.) Four buttons
I entered the text in first text box and select the item from those two combobox. Now there is another textbox and a
button named as add in front of it. When clicks on add after entering the text in that text box, the whole entry from the
form disaapears. Actually I have a main button names as save..I wants to save all the information but before that page
loads and all the information become disappears.
How could i hold the text when page load..I am struggling from last 16 days,yet not get the solution...
This is my page load and all Enableviewstate is true for all controls
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ds1 = con.ExecuteSPDS("TypeOfDll", "0", "ddlDailyReport");
if (ds1.Tables.Count > 0)
{
if (ds1.Tables[1].Rows.Count > 0)
{
ddlProduct.DataSource = ds1.Tables[1];
ddlProduct.DataTextField = "ProductName";
ddlProduct.DataValueField = "Id";
ddlProduct.DataBind();
ddlProduct.SelectedValue = "0";
}
if (ds1.Tables[0].Rows.Count > 0)
{
ddlHOffState.DataSource = ds1.Tables[0];
ddlHOffState.DataTextField = "State";
ddlHOffState.DataValueField = "Id";
ddlHOffState.DataBind();
ddlHOffState.SelectedValue = "0";
}
if (ds1.Tables[2].Rows.Count > 0)
{
ddlref.DataSource = ds1.Tables[2];
ddlref.DataTextField = "Reference";
ddlref.DataValueField = "Id";
ddlref.DataBind();
ddlref.SelectedValue = "0";
}
if (ds1.Tables[3].Rows.Count > 0)
{
ddlstatus.DataSource = ds1.Tables[3];
ddlstatus.DataTextField = "SalesStatus";
ddlstatus.DataValueField = "Id";
ddlstatus.DataBind();
ddlstatus.SelectedValue = "0";
}
if (ds1.Tables[4].Rows.Count > 0)
{
ddlOffType.DataSource = ds1.Tables[4];
ddlOffType.DataTextField = "OffType";
ddlOffType.DataValueField = "Id";
ddlOffType.DataBind();
ddlOffType.SelectedValue = "0";
}
}
}
if (Request.QueryString["id"] != null)
{
Filleditgrid();
}
else if (Request.QueryString["id"] == null)
{
FillDs();
}
}
[Edit]code block moved from answer[/Edit]
Plz help me