|
| |
|
|
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ɹɟ
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
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?????
|
|
|
|
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 !!!
|
|
|
|
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.
|
|
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
|
|
|