Server.Transfer and User Controls

Discussion in 'ASP .Net' started by Jason, Jan 27, 2005.

  1. Jason

    Jason Guest

    I have created a wizard like set of pages that carries
    over data submitted from one page to the next. I have
    created a user control (Searchsurveys) that consist of 4
    listboxes which is used on page1.aspx. This same
    usercontrol is on page2.aspx.

    When I use server.transfer to "submit" page1.aspx to
    page2.aspx, I had to write the following code in order to
    accept the data depending on the page:

    Dim sReferringPage As String = Request.ServerVariables
    ("Script_Name")
    If InStr(sReferringPage, "default", CompareMethod.Text) >
    0 Then
    strCountry = Request.Form("Searchsurveys:ddCountry")
    strLanguage = Request.Form("Searchsurveys:ddLanguage")
    strFunction = Request.Form("Searchsurveys:ddFunction")
    strDiagnostic = Request.Form("Searchsurveys:ddDiagnostic")
    Else
    strCountry = Request.Form("Searchsurveys1:ddCountry")
    strLanguage = Request.Form("Searchsurveys1:ddLanguage")
    strFunction = Request.Form("Searchsurveys1:ddFunction")
    strDiagnostic = Request.Form
    ("Searchsurveys1:ddDiagnostic")
    End If

    The reason being is that when I perform the
    server.transfer, the usercontrol appends the number "1"
    at the end. Is there a way around this?
     
    Jason, Jan 27, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c2lhag==?=
    Replies:
    7
    Views:
    1,560
    =?Utf-8?B?c2lhag==?=
    Mar 7, 2005
  2. =?Utf-8?B?Q29uZ2Vybw==?=

    Server.transfer and user control

    =?Utf-8?B?Q29uZ2Vybw==?=, May 26, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    505
    =?Utf-8?B?Q29uZ2Vybw==?=
    May 26, 2006
  3. Faizan Ahmed
    Replies:
    1
    Views:
    308
    John Saunders
    Jan 4, 2005
  4. Faizan Ahmed
    Replies:
    1
    Views:
    388
    John Saunders
    Jan 4, 2005
  5. Jim
    Replies:
    1
    Views:
    986
    Aaron Bertrand - MVP
    Jan 28, 2004
Loading...

Share This Page