473,386 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Passing 'Variable" into ASP project using VB

Very new at ASP in dotnet.

If I put a variable in the URL such as

http://mysite/myapp.aspx?variable=123

how do I retrieve the variable from my asp code so that I can use that value
to determine what I send on my page???

Thanks,
Larry
Nov 18 '05 #1
3 1132
Request.QueryString("variable")

"Larry" <La***@NoMail.com> wrote in message
news:QCrCb.34269$8y1.142610@attbi_s52...
Very new at ASP in dotnet.

If I put a variable in the URL such as

http://mysite/myapp.aspx?variable=123

how do I retrieve the variable from my asp code so that I can use that value to determine what I send on my page???

Thanks,
Larry

Nov 18 '05 #2
That did it. Thank you so much!!!

"alien2_51" <dan.billow"at"n.o.s.p.a.m.monacocoach.commercialv ersion> wrote
in message news:up**************@TK2MSFTNGP10.phx.gbl...
Request.QueryString("variable")

"Larry" <La***@NoMail.com> wrote in message
news:QCrCb.34269$8y1.142610@attbi_s52...
Very new at ASP in dotnet.

If I put a variable in the URL such as

http://mysite/myapp.aspx?variable=123

how do I retrieve the variable from my asp code so that I can use that

value
to determine what I send on my page???

Thanks,
Larry


Nov 18 '05 #3
Hi Larry,

Put this in the codebehind file of your ASP.NET page:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim intVar As Integer
intVar = Request("variable")
Response.Write("You got: " & intVar.ToString)
End Sub

"Larry" <La***@NoMail.com> wrote in message
news:QCrCb.34269$8y1.142610@attbi_s52...
Very new at ASP in dotnet.

If I put a variable in the URL such as

http://mysite/myapp.aspx?variable=123

how do I retrieve the variable from my asp code so that I can use that value to determine what I send on my page???

Thanks,
Larry

Nov 18 '05 #4

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

Similar topics

2
by: Leicester B. Ford Jr. | last post by:
I want to be able to register a class that a factory can build for me at a later time. How can I pass the class's type to a method? public class MyClass{ static public void Register(Type...
2
by: Gentian Hila | last post by:
Hi, I am a beginner with Visual C++ (I am using .NET 2002) MY problem is that sometimes the main dialog class dissapears from the class view ( so if my project is named Test, I cannot see CTestDlg...
2
by: Kevin Frey | last post by:
Is it possible to get c# perform a using statement where the namespace for the using is not specified literally but instead comes from a variable, a token, a predefined value etc. We have...
5
by: glenn | last post by:
Hi folks, The problem I have is that a query string works if hard-coded but if I pass a variable to it, it does not work as shown here. This works: querystring="SELECT * FROM USERS WHERE...
11
by: gg9h0st | last post by:
i saw a code refactorying onload event listener window.onloadListeners=new Array(); window.addOnLoadListener=function(listener) { window.onloadListeners=listener; } why declare the...
2
by: peaforabrain | last post by:
I am having trouble exercising this function, and wondered whether anyone would be kind enough to help. I have a php/mysql output that i would like to pass to an iframe in order for a form to...
1
by: Shailja | last post by:
Hi, How to increament a variable by 2 using For loop in VB 6.0. Kindly let me know if u know. Thanks
5
by: paragpdoke | last post by:
Hello Everyone. I'm new to XSL and couldn't get something to work. Sample XML excerpt: <root> <ObjectTemplate> <NodeType1></NodeType1> <NodeType2></NodeType2> </ObjectTemplate> <Object>
3
by: Andrea Raimondi | last post by:
Hello peers! I'm working on this application and I'm in need for some thoughtful advice :-p I have an SQLDataSource with params, select, etc. One of my params is the table name, which can be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.