Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-28-2004, 09:47 AM   #1 (permalink)
rmill9681
Registered User
 
Join Date: Sep 2004
Posts: 8
rmill9681 is on a distinguished road
new to asp.net

Hello everyone,
I am attempting to create several web pages using asp.net. I am having a problem passing information entered into the first page (a login id) to the next page and using that obtained information to search a database in a c# file.

basically:

PAGE 1:
enter id -> PAGE 2
id -> .cs file -> sql query uses id.

could anyone explain how to do this?
rmill9681 is offline   Reply With Quote
Old 11-28-2004, 09:51 AM   #2 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
Are you using a web server control like a textbox or are you using a standard html input control? Either way you should be able to use the Form or the Querystring method of the Request object to do what you are wanting.
__________________
~Ryan

rdove is offline   Reply With Quote
Old 11-28-2004, 10:34 AM   #3 (permalink)
rmill9681
Registered User
 
Join Date: Sep 2004
Posts: 8
rmill9681 is on a distinguished road
the first page would be a textbox. Could you post an example of the form method. I am just learning the basics of asp.net and html
rmill9681 is offline   Reply With Quote
Old 11-28-2004, 02:00 PM   #4 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
Quote:
Originally Posted by rmill9681
the first page would be a textbox. Could you post an example of the form method. I am just learning the basics of asp.net and html
Code:
Request.Form("textboxnamehere")
__________________
~Ryan

rdove is offline   Reply With Quote
Old 11-28-2004, 02:12 PM   #5 (permalink)
rmill9681
Registered User
 
Join Date: Sep 2004
Posts: 8
rmill9681 is on a distinguished road
and could that also be used on a 3rd page? page1-->page2-->page3 (page3 refers to some parameter in page1)
rmill9681 is offline   Reply With Quote
Old 11-29-2004, 08:05 AM   #6 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
You have to store it on page 2 in order to use it on page 3.

Some thing you could do:

1) Store the value in a hidden field and pass it from page to page. Use the Request.Form method to retrieve it.

2) Pass the value via Request.Querystring method from page to page

3) Store the value in a Session variable or Cookie, this way you can use it anywhere until either you clear the variable or the user close the browser sesssion. With cookies you can also persist the value so the next time they come back, it will be able to retrieve it off thier computer.
__________________
~Ryan

rdove is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp & asp.net sde Lounge 0 04-27-2004 01:28 PM
ASP.NET: Day / Work Week / Week / Month web calendar control with view like MS Outloo gicio MS Technologies ( ASP, VB, C#, .NET ) 0 12-10-2003 10:05 AM


All times are GMT -8. The time now is 10:45 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting