473,487 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Server.Transfer and User Controls

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?
Nov 19 '05 #1
0 868

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
12393
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
3
2118
by: Manuel Lopez | last post by:
Hello, We have two applications that will reside on the same webserver. We want to be able to post from pages in App1 to to pages in App2. We need to pass sensible data, so we cannot use...
1
258
by: Red | last post by:
I am using Server.Transfer("MyForm.aspx", true) to move the user to a different form. I have a button that allows the user to go back to the original form. I thought that setting the presrveForm...
2
3351
by: Pete | last post by:
Hi all... I sincerly hope one of the MS guys can clear this up for me... First some background... Ok, I have a web site which is fully translatable into several languages. All the strings...
2
4312
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
1
1586
by: John | last post by:
Hi all, In one of my user controls, i perform a Server.Transfer with a false. The reason is to re-navigate to a page with different settings then different controls are re-loaded. The problem...
10
2012
by: Ben | last post by:
Hi, I made an application in classic asp (reservation of books and video stuffs for students) and want to migrate to asp.net. The user has to chose a date, then pushung on a submit button. The...
2
6914
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
9
1528
by: senfo | last post by:
In my not so humble opinion, Server.Transfer() looks good on paper, but I have yet to come across a use for it that couldn't be accomplished better another way. When it comes down to it, I really...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.