Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Server.Transfer and User Controls

Thread Tools

Server.Transfer and User Controls

Posts: n/a
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
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")
strCountry = Request.Form("Searchsurveys1:ddCountry")
strLanguage = Request.Form("Searchsurveys1:ddLanguage")
strFunction = Request.Form("Searchsurveys1:ddFunction")
strDiagnostic = Request.Form
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?
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Controls.Count, Controls.IsSynchronized, and Controls.SyncRoot Nathan Sokalski ASP .Net 4 09-05-2007 03:27 AM
using javascript in User controls to access server controls of the user control Faizan Ahmed ASP .Net Building Controls 1 01-04-2005 04:09 PM
using javascript in User controls to access server controls of the user control Faizan Ahmed ASP .Net Web Controls 1 01-04-2005 04:09 PM
IntelliSense on Web User Controls and Web Custom Controls Axel Dahmen ASP .Net 1 11-12-2003 06:12 AM
HTML Controls and User controls trinitypete ASP .Net 6 06-26-2003 09:47 AM