Click here to Skip to main content
15,897,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi There.

Can any 1 tell me,How to Call the parameterized constructor of WebPage in asp.net.
When we use,
C#
Response.Redirect("url");

eg.
C#
Page1.aspx
{
  public Page1()
  {
    //Default Constructor.
  }
 public Page1(int Id)
 {
  //Parameterized Constructor.
 }
}
Pag2.aspx
{
  protected void Button_Click(object sender, EventArgs e)
   {
       Response.Redirect("Page1.aspx");
   }
}
Posted
Updated 29-Dec-11 20:00pm
v3

1 solution

Hi,

Normally while transfering data you can use like this!

C#
Session.Add("BatchID", Batchid);

          Response.Redirect("sample.aspx?Batch_id=" + Session["BatchID"].ToString() + "",false);
 
Share this answer
 
Comments
Member 7731046 30-Dec-11 2:33am    
actually, i dont want to use Session or Query string.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900