Server.Transfer and User Controls

J

Jason

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top