int pageid = Convert.ToInt32(Request.QueryString["Mode"].ToString().Trim());
if (mode.Equals("Edit")
{
//Execute query and save in dataset
DataSet ds = SqlHelper.ExecuteDataset(ConnectionString, CommandType.Text, "select *,(cast(regionID as varchar) +','+ cast(countryId as varchar) +','+ cast(cityid as varchar)) as id from vwDestinationLocation order by location");
//Fill the input boxes
txtWDesc.Value = dsContent.Tables[0].Rows[0]["WeatherDesc"].ToString();
txtHDesc.Value = dsContent.Tables[0].Rows[0]["HistoryDesc"].ToString();
txtVdesc.Value = dsContent.Tables[0].Rows[0]["VisitDesc"].ToString();
// After this run the update query.
}
else (mode.Equals("Insert"))
{
//here run the insert query.
}
ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://sandeep-chourasia.blogspot.com/
Shailesh21235, if this helps please login to Mark As Answer. |
Reply | Alert Moderator