Insert Form Tag Inside MasterPage

Posted on 2009-03-31
Last Modified: 2012-05-06
Hi, all.

I Have the following html:

<form action="" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">

<asp:ImageButton ID="btnLogin" runat="server"  ImageUrl="images/loginButton.gif" AccessKey="s" />
                        <input type="password" name="vb_login_password" id="navbar_password" />
                        <input type="text" name="vb_login_username" id="navbar_username"
                            accesskey="u" value="'3E 'DE3*./E" onfocus="if (this.value == ''3E 'DE3*./E') this.value = '';" />
                    <input type="hidden" name="s" value="" />
                    <input type="hidden" name="do" value="login" />
                    <input type="hidden" name="vb_login_md5password" />
                    <input type="hidden" name="vb_login_md5password_utf" /


I want the previous form to be inside master page, I know it will not work.
So do anyone has an idea .
Thanks for any help
Question by:safiint
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3

Expert Comment

ID: 24030536
You may want to use NESTED MASTERPAGES.

You can create a root master page for a site that defines a site's overall layout, and then create nested master pages that are based on the root master and further customize the layout, allowing you to embed forms into the master.

Here is a good article:

For your problem, you'd make another master page content holder then put the form outside any other main forms on the page. you have to restructue to accomindate this.

-- jq

Author Comment

ID: 24038599
No JennyQ, I want to put this form in the MainMasterPage.

I tried the following:

<asp:imagebutton class="loginBtn" id="btnLogin" runat="server" postbackurl=""
    imageurl="images/loginButton.gif" accesskey="s" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)" />
<input type="password" class="txtUser" name="vb_login_password" id="navbar_password" />
<input type="text" class="txtUser" name="vb_login_username" id="navbar_username"
    accesskey="u" value="user name" onfocus="if (this.value == 'user name') this.value = '';" />
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />


but when I click on the button It give me the following message from the "Forum domain":

"In order to accept POST request originating from this domain, the admin must add this domain to the whitelist."

Expert Comment

ID: 24040799
That error is an apache or tomcat error right? that is not IIS.

A whitelist is a list of accepted items or persons in a set. This list is inclusionary, confirming that the item being analyzed is acceptable. It is the opposite of a blacklist which confirms that items are not acceptable.
An e-mail whitelist is a list of contacts that the user deems are acceptable to receive email from and should not be sent to the trash folder.

You need to configure your webserver it sounds like.
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now


Author Comment

ID: 24050081
I don't have any control on the forum to add my site to the whitelist.

And I test the form outside of my domain and it's worked but when I run it from my domain it gives the error.

So if there any way to do this.

Accepted Solution

JenniQ earned 500 total points
ID: 24051846
Is this by any chance a vBulletin error?

Author Comment

ID: 24071568
I don't think so

But I which to that by take the value of the text boxes to another page that not inherit from the master page, that may be work.

So how can we do that without querystring because there is a password

Author Closing Comment

ID: 31564833
sorry JennyQ the problem was happened because I was testing my domain on the localhost.

when I publish it to the net it working with a new problem.

so I will ask about it.

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question