I have got a bit of a problem.
I have two pages (Thumbnail.aspx & FormFilling.aspx); in FormFilling.aspx I have the following code:
Response.Redirect("Thumbnail.aspx?productID=" + Request.QueryString["pid"].ToString() + "&")
In Thumbnail.aspx I have the following function:
private void Preview(){
//something happens
}
What I am trying to do is call that function in Response.Redirect Is this possible?
If the Preview() function is part of Thumbnail.aspx and you want to call it from FormFilling.aspx, you’ll need to either mark the function as static or put it in a central class that both ASPX pages have access to. A lot of developers will make a PageBase class that ASPX pages derive from, and this would be a great place for logic commonly used by multiple pages.