Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting form - Master Pages

Status
Not open for further replies.

elhaix

Programmer
Jul 31, 2006
115
CA
I have a master page that uses a custom control.
My control has a dropdown with account names, that when changed, I want to set the form action (of the master page) to say, account.aspx, along with the dropdown's value.

First page view is default.aspx (uses Master page, Master1.master).

I've created a hidden field in the control; the dropdown's onChange event sets the account name, but I want to set the action, and submit the form.

Make sense?


 
you can do that using javascript. this is the script to use:

<script>
document.forms[0].action="New Page"
document.forms[0].submit()
</script>

however i wouldnt suggest that. why do you want to do this???

Known is handfull, Unknown is worldfull
 
Ok, maybe my approach is all wrong and needs some fixin' - let me know.

As I said, here's the scenario:

My Master page contains a menu header control which contains a dropdown of accounts.

A child page, uses this master page, and when an account is selected, I want another child page to be opened, and the selected account (from the drop down) needs to be passed to that page.

Is that a bit better?
 
Just use Response.Redirect on the SelectedIndexChanged event of the DropDownList


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Right, but I don't want to include the account ID in the URL - that's why I want to pass a POST form variable.

 
Hello. I have sort of same question... I wanto to send an user and status to another page, using POST. I add the "action=MyPage.aspx" in the HTML part of the code, but when I compile my "action" dissapears. There must be a way to transfer data between pages without session vars. How can I do that?
 
gcastillo you have already posted the same question here:
thread855-1252709
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top