If I set on my page : EnableViewState=\"true\" ViewStateMode=\"Disabled\"
- Then - the Viewstate is disable for the page ( unless override...)
The
protected void Page_Load(object sender, EventArgs e)
{
(!Page.IsPostBack)
{
string qry = "SELECT TOP(5)xxx, xxxx FROM dbo.xxxxxx ";
DataSet ds = new DataSet();
ds = SqlHelper.ExecInDS(qry);
drpDwn.DataSource = ds.Tables[0];
drpDwn.DataValueField = Convert.ToString(ds.Tables[0].Columns["xxx"]);
drpDwn.DataTextField = Convert.ToString(ds.Tables[0].Columns["xxx"]);
drpDwn.DataBind();
}
//Here You will get selected value from dropdown
string sss= Request.Form["drpDwn"];
}