1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Example of Server.Transfer and Context Handler

Discussion in 'ASP.NET' started by hanusoft, Sep 3, 2007.

  1. hanusoft

    hanusoft New Member

    This is an example of Server.Transfer and Context Handler. Through this we can get the multiple values of previous form.

    In this page we are displaying data from previous form. We can use this technique for multiple form registration form.

    Code (ContextParent.aspx.cs): -
    private void Button1_Click(object sender,System.EventArgs e)
    internal Hashtable Value
    		Hashtable objHT = new Hashtable();
    		objHT["FathersName"]= TextBox2.Text;
    		objHT["Address"] = TextBox3.Text;
    		return objHT;
    Code (ContextChild.aspx.cs) :-
    private void Page_Load(object sender, System.EventArgs e)
    	// Put user code to initialize the page here
    	Hashtable objHT = new Hashtable(); 
    		ContextParent ParentPage;
    		ParentPage = (ContextParent)Context.Handler;
    		objHT = ParentPage.Value;
    		foreach(DictionaryEntry di in objHT)
    			Response.Write(di.Key +" : "+di.Value);
  2. adithespeedy

    adithespeedy New Member

    [/PHP]it was too good
  3. pradeep

    pradeep Team Leader

    What exactly does Server.Transfer do?
  4. narayan

    narayan New Member

    I think server.transfer will avoid a round trip from client to server

Share This Page