Front Office Football Central  

Go Back   Front Office Football Central > Archives > FOFC Archive
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 10-10-2007, 08:14 PM   #1
gstelmack
Pro Starter
 
Join Date: Oct 2000
Location: Cary, NC
ASP.NET 2.0 Question: Passing Data to Another Page

What I'd like to do:

Have a page with a list of, say, 32 teams. You click a team, and another page opens with data on that team.

My understanding is I can do a link that looks something like:

hxxp://www.myleaguesite.net/TeamInfoPage.aspx?teamid=7

Correct? But how do I pull that teamid out on TeamInfoPage.aspx so I can look up and display that team?

Yes, I'm a complete noob at web stuff, please bear with me. I've got lots of stuff figured out, but my handful of attempts at this one piece have ended in miserable failure. I'm also willing to go with other options if they'll work better for ASP.NET 2.0.
__________________
-- Greg
-- Author of various FOF utilities

gstelmack is offline   Reply With Quote
Old 10-10-2007, 08:29 PM   #2
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
It's been a very long time since I messed around with ASP, but I think I used VBScript to get the value of variables from the HTTP. I don't think there's anything in ASP itself that will pull the value.

But this was about 6-7 years ago, so I may be very wrong on that.
sabotai is offline   Reply With Quote
Old 10-10-2007, 08:52 PM   #3
Neon_Chaos
Pro Starter
 
Join Date: Nov 2004
Location: Parañaque, Philippines
Use Context.Item

There are several tutorials on the web. You can pass the contents into another webpage after doing a server transfer. The containing data will only exist for that one state, and will expire after that state passes.
__________________
Come and see.
Neon_Chaos is offline   Reply With Quote
Old 10-10-2007, 08:53 PM   #4
Neon_Chaos
Pro Starter
 
Join Date: Nov 2004
Location: Parañaque, Philippines
Or, if you're working with a VB.Net backbone behind the ASP.Net, you can just create a masterpage, and have everything work inside, so you can encapsulate data and just keep passing variables back and forth via the VB.Net framework.
__________________
Come and see.
Neon_Chaos is offline   Reply With Quote
Old 10-10-2007, 09:17 PM   #5
lordscarlet
Pro Starter
 
Join Date: Oct 2005
Location: Washington, DC
If you're still using nhibernate there's a way to quickly do it (you just query the db again with the id specified), I can look it up tomorrow, as I'm about to head to bed and don't remember it off the top of my head.
__________________
Sixteen Colors ANSI/ASCII Art Archive

"...the better half of the Moores..." -cthomer5000
lordscarlet is offline   Reply With Quote
Old 10-10-2007, 09:21 PM   #6
lordscarlet
Pro Starter
 
Join Date: Oct 2005
Location: Washington, DC
dola:

maybe: Customer customer = (Customer)
session.Load(typeof(Customer), "ALFKI");
__________________
Sixteen Colors ANSI/ASCII Art Archive

"...the better half of the Moores..." -cthomer5000
lordscarlet is offline   Reply With Quote
Old 10-10-2007, 10:06 PM   #7
cuervo72
Head Coach
 
Join Date: Dec 2002
Location: Maryland
Request.QueryString("teamid") ? Or does that only work in regular asp?

(also, Request("teamid") works generically for both Request.QueryString and Request.Form - I think)
__________________
null

Last edited by cuervo72 : 10-10-2007 at 10:07 PM.
cuervo72 is offline   Reply With Quote
Old 10-10-2007, 10:09 PM   #8
cuervo72
Head Coach
 
Join Date: Dec 2002
Location: Maryland
Dola - you could always use php....

(I could hook you up with some things)
__________________
null
cuervo72 is offline   Reply With Quote
Old 10-10-2007, 11:09 PM   #9
Fidatelo
Pro Starter
 
Join Date: Nov 2002
Location: Winnipeg, MB
Quote:
Originally Posted by cuervo72 View Post
Request.QueryString("teamid") ? Or does that only work in regular asp?

(also, Request("teamid") works generically for both Request.QueryString and Request.Form - I think)

Request.QueryString is the easiest way to do it if the data is being passed in via the URL as gstelmack suggests.
__________________
"Breakfast? Breakfast schmekfast, look at the score for God's sake. It's only the second period and I'm winning 12-2. Breakfasts come and go, Rene, but Hartford, the Whale, they only beat Vancouver maybe once or twice in a lifetime."
Fidatelo is offline   Reply With Quote
Old 10-11-2007, 05:55 AM   #10
lordscarlet
Pro Starter
 
Join Date: Oct 2005
Location: Washington, DC
ohhhhhh.. you just want to get the actual id in the querystring??

Request.QueryString["TeamId"] or Request.Parameter["TeamId"] should work fine.

You'll also want to cast it..

Convert.ToInt32(Request.QueryString["TeamId"]);
__________________
Sixteen Colors ANSI/ASCII Art Archive

"...the better half of the Moores..." -cthomer5000
lordscarlet is offline   Reply With Quote
Old 10-11-2007, 08:24 AM   #11
gstelmack
Pro Starter
 
Join Date: Oct 2000
Location: Cary, NC
Thanks, I think Request.QueryString is exactly what I'm looking for.

I'm not using PHP because I know C# well enough that I'm actually able to get some stuff done (and I love the language). Plus I'm having fun learning ASP.NET 2.0. I've been able to do some pretty cool stuff using C# (I'm pretty proud of the auto-league-calendar generator I've got for WOOF...)
__________________
-- Greg
-- Author of various FOF utilities
gstelmack is offline   Reply With Quote
Old 10-11-2007, 09:02 AM   #12
Fidatelo
Pro Starter
 
Join Date: Nov 2002
Location: Winnipeg, MB
C# is a pretty cool language, I moved to it from VB.NET about 6 months ago and I've never looked back.

That said, I'm getting really tempted to dive into the Ruby on Rails stuff.
__________________
"Breakfast? Breakfast schmekfast, look at the score for God's sake. It's only the second period and I'm winning 12-2. Breakfasts come and go, Rene, but Hartford, the Whale, they only beat Vancouver maybe once or twice in a lifetime."
Fidatelo is offline   Reply With Quote
Old 10-11-2007, 10:10 AM   #13
lordscarlet
Pro Starter
 
Join Date: Oct 2005
Location: Washington, DC
Quote:
Originally Posted by Fidatelo View Post
C# is a pretty cool language, I moved to it from VB.NET about 6 months ago and I've never looked back.

That said, I'm getting really tempted to dive into the Ruby on Rails stuff.

I am a C# (ASP.NET) developer by profession. I spent about 6 months doing Rails on the side and loved it. Ultimately I decided to put it to bed because it wasn't advancing my knowledge for my career like developing in C# on the side would be. But rails is fantastic.
__________________
Sixteen Colors ANSI/ASCII Art Archive

"...the better half of the Moores..." -cthomer5000
lordscarlet is offline   Reply With Quote
Old 10-11-2007, 10:15 AM   #14
Fidatelo
Pro Starter
 
Join Date: Nov 2002
Location: Winnipeg, MB
I'm a .NET dev by profession too, and it is those same doubts about "wasting my time" that have kept me away from Rails. That said, with MVP's like Scott Bellware making the switch, it really has me thinking.

Locally a group of guys has started a Rails User Group. Their second meeting is next month so I think I will do a little studying beforehand and then attend. Part of me thinks it might be tempting to switch gears career-wise if the right alternative popped up...
__________________
"Breakfast? Breakfast schmekfast, look at the score for God's sake. It's only the second period and I'm winning 12-2. Breakfasts come and go, Rene, but Hartford, the Whale, they only beat Vancouver maybe once or twice in a lifetime."
Fidatelo is offline   Reply With Quote
Old 10-11-2007, 10:35 AM   #15
lordscarlet
Pro Starter
 
Join Date: Oct 2005
Location: Washington, DC
Quote:
Originally Posted by Fidatelo View Post
I'm a .NET dev by profession too, and it is those same doubts about "wasting my time" that have kept me away from Rails. That said, with MVP's like Scott Bellware making the switch, it really has me thinking.

Locally a group of guys has started a Rails User Group. Their second meeting is next month so I think I will do a little studying beforehand and then attend. Part of me thinks it might be tempting to switch gears career-wise if the right alternative popped up...

If you'll consider switching gears completely, it's definitely worth trying out. I am too happy with my job to switch over to Rails, but if I wasn't I would love to find a job doing Rails.
__________________
Sixteen Colors ANSI/ASCII Art Archive

"...the better half of the Moores..." -cthomer5000
lordscarlet is offline   Reply With Quote
Old 10-11-2007, 10:37 AM   #16
MikeVic
Head Coach
 
Join Date: Mar 2003
Location: Hometown of Canada
Quote:
Originally Posted by Fidatelo View Post
I'm a .NET dev by profession too, and it is those same doubts about "wasting my time" that have kept me away from Rails. That said, with MVP's like Scott Bellware making the switch, it really has me thinking.

Locally a group of guys has started a Rails User Group. Their second meeting is next month so I think I will do a little studying beforehand and then attend. Part of me thinks it might be tempting to switch gears career-wise if the right alternative popped up...

I go to the .NET User Group! They mentioned this about Ruby on Rails. I don't do web dev, so I've never used it.

http://www.railsmanitoba.com/
MikeVic is offline   Reply With Quote
Old 10-11-2007, 10:53 AM   #17
Fidatelo
Pro Starter
 
Join Date: Nov 2002
Location: Winnipeg, MB
Quote:
Originally Posted by MikeVic View Post
I go to the .NET User Group! They mentioned this about Ruby on Rails. I don't do web dev, so I've never used it.

http://www.railsmanitoba.com/

Heh, cool, I bet we were in the same room on tuesday listening to John Bristowe
__________________
"Breakfast? Breakfast schmekfast, look at the score for God's sake. It's only the second period and I'm winning 12-2. Breakfasts come and go, Rene, but Hartford, the Whale, they only beat Vancouver maybe once or twice in a lifetime."
Fidatelo is offline   Reply With Quote
Old 10-11-2007, 10:56 AM   #18
MikeVic
Head Coach
 
Join Date: Mar 2003
Location: Hometown of Canada
Quote:
Originally Posted by Fidatelo View Post
Heh, cool, I bet we were in the same room on tuesday listening to John Bristowe

That's freaky. There weren't many people there...
MikeVic is offline   Reply With Quote
Old 10-11-2007, 11:01 AM   #19
ThunderingHERD
College Benchwarmer
 
Join Date: Oct 2000
Location: North Carolina
Are there really there really a lot of enterprise apps using Rails? I don't really know anything about it, but I had the impression that it was more of a "Web 2.0" fad.
__________________
"I'm losing my edge--to better looking people... with better ideas... and more talent. And who are actually really, really nice."

"Everyone's a voyeurist--they're watching me watch them watch me right now."
ThunderingHERD is offline   Reply With Quote
Old 10-11-2007, 11:02 AM   #20
Fidatelo
Pro Starter
 
Join Date: Nov 2002
Location: Winnipeg, MB
Quote:
Originally Posted by MikeVic View Post
That's freaky. There weren't many people there...

You didn't happen to go out for drinks at Bailey's after did you?...
__________________
"Breakfast? Breakfast schmekfast, look at the score for God's sake. It's only the second period and I'm winning 12-2. Breakfasts come and go, Rene, but Hartford, the Whale, they only beat Vancouver maybe once or twice in a lifetime."

Last edited by Fidatelo : 10-11-2007 at 11:03 AM.
Fidatelo is offline   Reply With Quote
Old 10-11-2007, 11:18 AM   #21
gstelmack
Pro Starter
 
Join Date: Oct 2000
Location: Cary, NC
Quote:
Originally Posted by ThunderingHERD View Post
Are there really there really a lot of enterprise apps using Rails? I don't really know anything about it, but I had the impression that it was more of a "Web 2.0" fad.

My experiences with Rails are colored by the host that WOOF was on...
__________________
-- Greg
-- Author of various FOF utilities
gstelmack is offline   Reply With Quote
Old 10-11-2007, 11:37 AM   #22
MikeVic
Head Coach
 
Join Date: Mar 2003
Location: Hometown of Canada
Quote:
Originally Posted by Fidatelo View Post
You didn't happen to go out for drinks at Bailey's after did you?...

Haha no I didn't. I've been fighting a cold, and I was still feeling weak. Didn't wanna drink.
MikeVic is offline   Reply With Quote
Old 10-11-2007, 12:37 PM   #23
lordscarlet
Pro Starter
 
Join Date: Oct 2005
Location: Washington, DC
Quote:
Originally Posted by ThunderingHERD View Post
Are there really there really a lot of enterprise apps using Rails? I don't really know anything about it, but I had the impression that it was more of a "Web 2.0" fad.

There are definitely some mid-level ones, and probably some sites you use, but I don't know about enterprise.

Quote:
Originally Posted by gstelmack View Post
My experiences with Rails are colored by the host that WOOF was on...

Yeah.. dreamhost has a lot of haters for different reasons, probably mostly justified.
__________________
Sixteen Colors ANSI/ASCII Art Archive

"...the better half of the Moores..." -cthomer5000
lordscarlet is offline   Reply With Quote
Old 10-11-2007, 01:52 PM   #24
Fidatelo
Pro Starter
 
Join Date: Nov 2002
Location: Winnipeg, MB
Quote:
Originally Posted by MikeVic View Post
Haha no I didn't. I've been fighting a cold, and I was still feeling weak. Didn't wanna drink.

Heh, cool. You know, I'm gonna end up profiling the whole crowd at the next one now :P
__________________
"Breakfast? Breakfast schmekfast, look at the score for God's sake. It's only the second period and I'm winning 12-2. Breakfasts come and go, Rene, but Hartford, the Whale, they only beat Vancouver maybe once or twice in a lifetime."
Fidatelo is offline   Reply With Quote
Old 10-11-2007, 02:01 PM   #25
MikeVic
Head Coach
 
Join Date: Mar 2003
Location: Hometown of Canada
Quote:
Originally Posted by Fidatelo View Post
Heh, cool. You know, I'm gonna end up profiling the whole crowd at the next one now :P

Haha. I'll be hiding.
MikeVic is offline   Reply With Quote
Old 10-11-2007, 02:27 PM   #26
Fidatelo
Pro Starter
 
Join Date: Nov 2002
Location: Winnipeg, MB
Well that will be easy then, I'll just look for the guy crouched behind a chair...
__________________
"Breakfast? Breakfast schmekfast, look at the score for God's sake. It's only the second period and I'm winning 12-2. Breakfasts come and go, Rene, but Hartford, the Whale, they only beat Vancouver maybe once or twice in a lifetime."
Fidatelo is offline   Reply With Quote
Old 10-11-2007, 02:28 PM   #27
MikeVic
Head Coach
 
Join Date: Mar 2003
Location: Hometown of Canada
Quote:
Originally Posted by Fidatelo View Post
Well that will be easy then, I'll just look for the guy crouched behind a chair...

Good point.
MikeVic is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 05:43 AM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.