473,467 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to transfer variable from C# aspx page to the VBS asp page

5 New Member
Hi, I am using C# .aspx page to authenticate a user in AD environment. Then if the login is successful the user is redirected to the .asp VB script located at the same directory. The question that I want to ask is how do I transfer a variable Username to the VB script.

In the previous iteration the VB script was using Windows authentication, to check the user. And I was asked to move everything to the form authentication. I have no problem with authentication I just need to find a way of how to get a variable across. I feel as if it something simple and banal but, my experience of asp/aspx is shady.

The help will be greatly appreciated.
Apr 1 '08 #1
6 1582
nateraaaa
663 Recognized Expert Contributor
Can you pass the UserName variable in a querystring to your asp page?

Nathan
Apr 1 '08 #2
abadona
5 New Member
I tried doing this:
Context.Items["MyVar"]=txtUser.Text;

and in asp page:

strFinalName = Session("MyVar")

to replace this:

strFinalName = Request.ServerVariables("AUTH_USER") (my aspx page is handeling the authentication with forms methods, then redirects to asp page)
Apr 1 '08 #3
nateraaaa
663 Recognized Expert Contributor
It is very difficult to pass a Session value from a .NET application to an asp page. It would be much less work to pass the value as a querystring and access it in the asp page with

Request.Querystring
Apr 1 '08 #4
abadona
5 New Member
It is very difficult to pass a Session value from a .NET application to an asp page. It would be much less work to pass the value as a querystring and access it in the asp page with

Request.Querystring

This is good, but I need to hide the varible from users.
Apr 1 '08 #5
abadona
5 New Member
Error executing child request for ASPXTOASP.aspx.

Thank you but this is what I get every time when i try to do server.transfer....
Apr 2 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: shin | last post by:
hi i have an asp.net page and i am trying to transfer control to another asp.net page response.redirect works fine but server.transfer gives me the foll error why is that ...
5
by: Julien C. | last post by:
Hi all, I have an "EditeItem.aspx" page which lets me edit properties of an "Item". In the OnClick() event of my Save button, I do save Item changes to the database and then I redirect the user...
4
by: Bob H | last post by:
Hi, I'm aware of the different ways to pass variables between ASP.Net pages. For pages that need to pass a variable, we're using the server.transfer method. For others, we're using...
1
by: Victor Song | last post by:
Hi We are trying to stream a file using server.transfer rather than response.redirect. We have it working for IIS 5.0 but IIS 6.0 refusing to let us transfer the file. If we do the less...
11
by: Alexander Bosch | last post by:
Hi, I'm having a problem similar to the one that's stated in this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839521 When I'm posting a page to itself with the bool value as true it...
2
by: David Berman | last post by:
It seems that my site is losing session information when using Server.Transfer. I have a page called PictureGallery.aspx. It takes an argument which is an index id, so it would look like...
4
by: Sparky Arbuckle | last post by:
I want to transfer to a search page from my default page to SearchResults.aspx and I want to pass a variable named strSearch. So far I have: Dim strSearch as string strSearch = tbSearch.text...
2
by: P K | last post by:
I am using server.transfer for a website being developed in vs.net 2005 And I need to get the posted values after server.transfer. For this I set the second parameter "true" in the transfer...
5
by: Richard | last post by:
I've developed a small ASPX template framework (based on Chun Li's article on CodeProject: http://www.codeproject.com/aspnet/headerfooter.asp#xx849313xx) which uses a IHttpModule to apply...
2
by: =?Utf-8?B?YWxiZXJ0b3Nvcmlh?= | last post by:
Hi, I'm using Threads, and when I try to do Server.Transfer, I recieved an error. (child object does not exist...) My Code: Dim t As New Thread(AddressOf Hilo) Private Sub Hilo()...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.