navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

ASPX - Database passing variable issues

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> ASPX - Database passing variable issues
Page: [1]
 
scpigksin

 

Posts: 8
Joined: 11/19/2007
Status: offline

 
ASPX - Database passing variable issues - 12/16/2007 18:53:13   
Using Web Expression
Database is Access in 03 format
Host is running ASP 2.0



Issue #1

I have a page ASPX format with a drop down box.
URL here. http://www.scfootballhistory.com/index.aspx

The drop down is populating correctly as you can see.....no problem
What I need to is to take the selected value from this page and have it available when the second page is opened................URL here....http://scfootballhistory.com/test.aspx

Simply put how do you hake the value of a drop down and pass it to second page.
http://www.scfootballhistory.com/test.aspx

I want the url to be http://www.scfootballhistory.com/test.aspx?school="Abbeville"
.......................where Abbeville comes from the user selection from the drop down box.



Issue #2

I have a created page with this format
URL here.
http://scfootballhistory.com/Teams/TeamOpponents.aspx?schoolId=214

On the page, the user will make a selection from the data loaded grid box. They will then be directed to another page (URL here http://scfootballhistory.com/Teams/SeriesRecords.aspx?schoolID=214&oppID=214 )

The first variable from the schoolID is being passed correctly but the second one OppID is not being passed

I can pass the first variable of school ID but I can not figure out how to pass the second variable. In other words the URL should state http://scfootballhistory.com/Teams/SeriesRecords.aspx?schoolID=214&oppID=103

This url correctly show the results. I just need to figure out how to pass both the team and the opponent.


Thanks for all the help
William Lee

 

Posts: 1179
Joined: 1/25/2002
From: Singapore
Status: offline

 
RE: ASPX - Database passing variable issues - 12/16/2007 20:08:19   

Issue #1
What do you have in mind when the user clicked the Button?

I can't find any function associated with the onClick event of the Button.

_____________________________

William Lee

pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ
nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ





(in reply to scpigksin)
scpigksin

 

Posts: 8
Joined: 11/19/2007
Status: offline

 
RE: ASPX - Database passing variable issues - 12/16/2007 21:51:17   
With the button I was trying to put the variable there and go to the page.
Figured out how to go to the second page but not pass the variable.

I assume if i pass the variable through the drop down then the button will not be neccessary


Thanks
dp

(in reply to William Lee)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: ASPX - Database passing variable issues - 12/16/2007 22:00:46   
quote:

Simply put how do you hake the value of a drop down and pass it to second page.


On the ASPX page, I'd keep it simple and add a button with the postbackURL of the control like this:

<asp:Button ID="Button1" runat="server" PostBackUrl="~/Test.aspx" Text="Go" />

You should be able to pick up the value in your data source on thee next page using normal methods.

quote:

I can pass the first variable of school ID but I can not figure out how to pass the second variable.


Are you using a template field on the datagrid column?

It should look something like this:

                  <asp:TemplateField HeaderText="View">
                     <ItemTemplate>                                    
                      <asp:HyperLink ID="Details" runat="server" NavigateUrl='<%# "~/Teams/SeriesRecords.aspx?schoolID=" &  Eval("SchoolID") & "&oppID=" & Eval("OpponentID")%>'  ToolTip="Details">Next</asp:HyperLink>
                  </ItemTemplate>
                 </asp:TemplateField>


Just be sure and use the appropriate column names from your data source in those Eval statements.

Those help any?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to William Lee)
scpigksin

 

Posts: 8
Joined: 11/19/2007
Status: offline

 
RE: ASPX - Database passing variable issues - 12/16/2007 22:44:15   
On the ASPX page, I'd keep it simple and add a button with the postbackURL of the control like this:

<asp:Button ID="Button1" runat="server" PostBackUrl="~/Test.aspx" Text="Go" />

You should be able to pick up the value in your data source on thee next page using normal methods.


========================
This is exactly what I did to move to the second page.

I just can not get the value from the first page to the second page.

I know it must be simple and just something I am missing on the second page.


thanks
dp

(in reply to rdouglass)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: ASPX - Database passing variable issues - 12/16/2007 22:47:31   
Are you setting the data source variable on the second page to the control from the first page?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to scpigksin)
scpigksin

 

Posts: 8
Joined: 11/19/2007
Status: offline

 
RE: ASPX - Database passing variable issues - 12/16/2007 22:56:23   

quote:

ORIGINAL: rdouglass

Are you setting the data source variable on the second page to the control from the first page?


No.....this is where I am making mistake.

How do I connect to the control on the first page from the second page?????

(in reply to rdouglass)
scpigksin

 

Posts: 8
Joined: 11/19/2007
Status: offline

 
RE: ASPX - Database passing variable issues - 12/16/2007 23:08:04   
quote:

Are you using a template field on the datagrid column?

It should look something like this:

<asp:TemplateField HeaderText="View">
<ItemTemplate>
<asp:HyperLink ID="Details" runat="server" NavigateUrl='<%# "~/Teams/SeriesRecords.aspx?schoolID=" & Eval("SchoolID") & "&oppID=" & Eval("OpponentID")%>' ToolTip="Details">Next</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>



Just be sure and use the appropriate column names from your data source in those Eval statements.

Those help any?



2ns issue SOLVED !!!!!!!!!

Thanks

Honestly I am not sure I wiould have ever figured that one out. I was looking at the problem from the wrong angle.

PERFECT SOLUTION !!!

Thanks !!!

(in reply to rdouglass)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: ASPX - Database passing variable issues - 12/16/2007 23:11:32   
quote:

How do I connect to the control on the first page from the second page?????


To be honest, I'm not entirely sure using Expression. I'd know how to do it in VS and it should be quite similar:

1. Set your data source variable on the second page to any control on that page; it shouldn't matter.
2. Hand edit the data source and change the control name in the DS to "DropDownList1".

At least it'll work that way in VS and they're both ASPX pages. Hope it helps.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to scpigksin)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> ASPX - Database passing variable issues
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts