CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 5/30/2006 6:41:00 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 6 Views: 150 Favorited: 0 Favorite
7 Items, 1 Pages 1 |< << Go >> >|
barryman9000
Asp.Net User
Master page and form Action5/30/2006 6:41:00 PM

0

I'm trying to use a master page, and set the form action and method to something other than the default:

<form name="aspnetForm" method="POST" action="memberPage.aspx" id="aspnetForm">.  This is how it appears when I view the source from a browser

I'm trying to set up an "Auto login" form, that will re-direct users to another website, and log them in automatically.  When I set the form to:

<form action = https://login.aspx id="form1" method = "POST" runat = "Server">  but it just keeps posting back to itself.

How can I set the form action with a master page?

craist
Asp.Net User
Re: Master page and form Action5/30/2006 6:53:13 PM

0

Instead of using the form action to do that couldn't you use a Server.Transfer("pagetogoto.html") or such in the Page_Load event of the content page?  That way whent the user hits the page it will automatically send him to the login page.  Does the user need to enter in a user/pass to login on that other page?

Craist

"if you can't find the needle, burn the haystack"
barryman9000
Asp.Net User
Re: Master page and form Action5/30/2006 7:00:41 PM

0

Thanks for the reply.  Once the user logs into my site, they have the option of making reservations on a different website.  I'm using the HTML form, so they can click a button on my site, which will seamlessly log them into the other website.  I have their user info stored in hidden input fields, so they don't have to type in their name and password on this "reservation" website.

craist
Asp.Net User
Re: Master page and form Action5/30/2006 7:18:42 PM

0

hmm, I am not sure how to go about getting that info back into the other sites user/pass form.  If the reservation site was also created by you then I know of code that would work, but if not then I am not too sure.  Good luck, let me know if the server.transfer actually helps or not.

Craist

"if you can't find the needle, burn the haystack"
barryman9000
Asp.Net User
Re: Master page and form Action5/30/2006 8:52:59 PM

0

Here's what I have:

<

form name="login" method="POST" action="https://Site.com/login.aspx">

<

input id="inMemberID" name="MemberID" type="Hidden"
value="<%= Server.HtmlEncode(Session("tblPID.MemberID")) %>" />

<input id="inPassword" name="Password" type="Hidden"
value="<%= Server.HtmlEncode(Session("tblPID.Password")) %>"/>

<input id="submit" name="Submit" type="submit" value="Make a Reservation"/>

</

form>

By clicking the submit button, it gathers the two session variables (MemberID & Password), takes them to "Site.com/login.aspx" and automatically logs them into their account.

I built an html page with this <form> tag, and it works fine.  This won't work with master pages, because once I use the runat="Server" attribute on the master page (so I can add the <asp:content> tag), but it's like nesting an html form within an asp.net form.

barryman9000
Asp.Net User
Re: Master page and form Action5/30/2006 10:30:42 PM

0

I'm sure there's a better way, but in case you're wondering, here's what I did:

1. Once the user logs into my site (starting the session) on the user account page, there is a reservation button that sends them to page 2-

Protected
Sub btnOne_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOne.Click
Response.Redirect(
"member2.aspx")
End Sub

2. On Page 2 I have the HTML form (the form w/o the runat="server" attribute)-

<

form name="login" method="POST" action=https://TheirSite.com/login.aspx enctype="">
<input id="inMemberID" name="MemberID" type="Hidden"
value="<%= Server.HtmlEncode(Session("tblPID.MemberID")) %>" /><br />

<input id="inPIN" name="PIN" type="Hidden"
value="<%= Server.HtmlEncode(Session("tblPID.Password")) %>"/>
</form>

3. And at the bottom of the page, there's some Javascript to automatically submit the form-

<

script language="javascript" type="text/javascript">
document.login.submit();
</script>

4. Which will take the users to TheirSite.com/login.aspx, where they're automatically logged in.  I'm pretty sure there's an easier way, but for now, I'm happy.  Thanks again for helping me out, this one was a pain.

craist
Asp.Net User
Re: Master page and form Action5/31/2006 2:55:33 PM

0

your welcome and ya definately a pain.  :) 

Good luck with rest of site.

Craist

"if you can't find the needle, burn the haystack"
7 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning Visual Web Developer 2005 Express: From Novice to Professional Authors: Paul Sarknas, Pages: 334, Published: 2005
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Macromedia Dreamweaver MX Dynamic Applications: Advanced Training from the Source Authors: Jeffrey Bardzell, Pages: 440, Published: 2003
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Macromedia Dreamweaver 8 with ASP, Coldfusion and PHP: Training from the Source Authors: Jeffrey Bardzell, Pages: 508, Published: 2005
Dreamweaver CS3 Bible: Master Every Aspect of Dreamweaver - Work with CSS, Text, Images, And Links - Incorporate Flash Movies and Other Media Authors: Joseph W. Lowery, Pages: 1112, Published: 2007
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
ASP.NET 2.0 Web Parts in Action: Building Dynamic Web Portals Authors: Darren Neimke, Pages: 324, Published: 2007

Web:
Can asp.net 2.0 form in masterpage render ID other than "aspnetFor in a page that's using a master page. The form inside a content placeholder ... ...
Master page and form Action - ASP.NET Forums Master page and form Action. Last post 05-31-2006 10:55 AM by craist. ... I'm trying to use a master page, and set the form action and method to something ...
Tag in a MasterPage environment - bytes Apr 27, 2006 ... when you use VS to create a MasterPage, it opens with a form tag ... ...
Passing master page form data to another webform - Stack Overflow I cannot set the form action to search.aspx, because all my other pages which use the master form will go to search.aspx. This I don't want. ...
Rewrite the master page form action attribute in asp.net 2.0 ... 2006年7月25日 ... Rewritethemasterpageformactionattributeinasp.net2. 0Whenallyourwebpagesarereferencetoamasterpage,whereaformelementhas.
Master Pages In ASP.NET 2.0 Jul 18, 2005 ... Just like any ASPX form, our master page can contain code in a .... The second screen shot above shows our default.aspx web form in action. ...
Form Elements in ASP.NET Master Pages and Content Pages - Stack ... Once in that tag, they are part of the master page's form. .... use a standard " all encompassing" server form, couldn't you capture the right action using a ...
Microsoft Expression PayPal button creates form within aspx master ... I simply deleted that form from the master page, and now that I don't have a form ... ...
Our CGI Software in Action : Master Form V4 as a Web Page Mailer With it's versatility and sophistication, Master Form V4 from /mfv4 can easily be used as a web page mailer — the.
aspnet Master Pages and changin ID of form tag !! I put my FORM tag in master page, and I set id of FORM tag to something ... NET Changed it to :
Videos:
Bloodsport - The Music Video ** DVD Quality Version can be downloaded here: (copy and paste) ** http://rapidshare.com/files/162859064/Bloodsport_-_The_Music_Video.mpg ...
Episode 104 - Speed times 2 super funny I speeded up an whole episode If you want me to put another attack or form/transformation or even epic battles or funny pieces of db/dbz/dbgt ...
Luke Hadley DVLH wrestling video DVD HHH WWE ECW CZW TNA Cena http://www.lukehadley.com DVLH Luke Hadley. A stunt is an unusual and difficult physical feat, or any act requiring a special skill, performed for ...
Luke Hadley - Scarred (Jackass documentary) Wrestling DVLH 2.5 http://www.lukehadley.com DVLH Luke Hadley. A stunt is an unusual and difficult physical feat, or any act requiring a special skill, performed for ...
[XHS] - Overdrive Shuffle Compilation Made by [XHS] - Rienk The Songs: 1. The Nasty Boyz - Angel 2. Eiffel 65 - Blue ( DJ Re-War & DJ Dave Mix ) 3. Ian Carey - Keep On Rising ...
Luke Hadley (DVLH wrestling DVD) HHH WWE ECW CZW TNA http://www.lukehadley.com DVLH Luke Hadley. A stunt is an unusual and difficult physical feat, or any act requiring a special skill, performed for ...
Luke Hadley's Jackass Wrestling DVD'S like CZW TNA WWE NWA ... http://www.lukehadley.com DVLH Luke Hadley. A stunt is an unusual and difficult physical feat, or any act requiring a special skill, performed for ...
The biggest frog splash in wrestling history (JCW DVLH ... http://www.myspace.com/DVLH2 Luke Hadley. DVLH A stunt is an unusual and difficult physical feat, or any act requiring a special skill, performed ...
WCN # 183 - World Chess News - ( Mitt i Schack ) This episode contains of: * Film from the Porcelain Cup (Porzellancup) * Europe Echecs in motion * The Swedish Chess Federation's board ...
Luke Hadley DVLH BYW video game Luke Hadley Classic DVLH wrestling http://www.lukehadley.com Backyard wrestling is a title applied to home filmed and produced professional ...






how to remove the separator?

menu not paying attention to font size

treeview and css control adapters

i can't find how to get reference to menu control from its menuitem! :(

asp.net master page w/xml and xslt

tableless control rendering

writing event handler in content page

programatically editing web.sitemap

need help converting existing page to content page

master page

problem creating sitemapnode for use in custom sitemapprovider

menu popout image attributes

wizard sidebartemplate

checkbox autopostback

sub menu not visible in ie

dropdown navigation that won't effect layout

master pages + web custom control + c# + flash + noob = not working

adding content dynamically to a content page in a masterpage contenplaceholder

user control, dynamic skins and the page_preinit.

master page and database problem

how to remember the menu selection in master page???

codebehind of nested masterpages

nested master pages

expand treenode .. pls help!

what difference between ie masterpage and netscape masterpage in design time?

master page with web forms which underfolder cant display logo why?

is it possible to set border property for contentplaceholder?

unable to set the value of hidden field on master page

first asp site

web user controls

   
  Privacy | Contact Us
All Times Are GMT