Posted on: 9/21/2012 1:18:32 AM | Views : 176

SqlDataAdapter sqlda = new SqlDataAdapter();
SqlCommand com = new SqlCommand();
DataTable dt;
int size = 0;
string str;
public int RowCount
{
get
{
int returnValue = 0;
if (Request.QueryString["rows"] != null)
{
try
{
int.TryParse(Request.QueryString["rows"].ToString()
, out returnValue);
}
catch
{
messageLabel.Text = @"Invalid row count!
Go back to the <a href=""Default.aspx"">home page</a>
to enter a value!";
}
}
return returnValue;
}
}
protected void submitLinkButton_Click(object sender, EventArgs e)
{
Response.Redirect(String.Format("Roomreservation.aspx?rows={0}", DropDownList6.Text));
 }
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{

Persons listOfPersons = new Persons(RowCount);
GridView1.DataSource = li ...

Go to the complete details ...