locked
server.transfer in mobile asp.net RRS feed

  • Question

  • User211858889 posted

    Hi,

      How to transfer the values from one page to another using server.transfer in mobile asp.net?

    Tuesday, November 6, 2007 7:02 AM

Answers

All replies

  • User214117797 posted

    Hi,

      How to transfer the values from one page to another using server.transfer in mobile asp.net?

     

    You can use query strings in your url when you do a server.transfer OR you can do Server.Transfer("my URL", true); the true means to preserve the current form collection so you can access the form data.

    Have a look here

    http://www.vbdotnetheaven.com/UploadFile/avi_sanjay/ServerTransfer02222007000910AM/ServerTransfer.aspx 

    Tuesday, November 6, 2007 4:07 PM
  • User211858889 posted

    But i  can't create the instance of main page from the second page.ie the scope of the main page not there in second page.

    Wednesday, November 7, 2007 12:40 AM
  • User214117797 posted

    But i  can't create the instance of main page from the second page.ie the scope of the main page not there in second page.

     

    When you use server.transfer with the overloaded method set to true, it preserves the previous forms data so you can just access it like this

    e.g. the original form has a text box called textbox1 and you have server.transfered using TRUE to a new page

    you should be able to get access to the textbox with Request.Form("textbox1")

    Or you can get the previous form by just casting the HttpContext.Current.Handler to the type of web form and directly access its properties.

    http://www.vbdotnetheaven.com/UploadFile/avi_sanjay/ServerTransfer02222007000910AM/ServerTransfer.aspx

    http://www.developer.com/net/asp/article.php/3299641

    http://www.vbdotnetheaven.com/UploadFile/avi_sanjay/ServerTransfer02222007000910AM/ServerTransfer.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 7, 2007 1:30 AM
  • User211858889 posted

    Thanks Jimmy for your quick reply.

    Wednesday, November 7, 2007 1:51 AM