Click here to Skip to main content
15,922,007 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,

Following code is working fine in separate page. But if I put same code in page with master page it won't redirect to next page. Any suggestion please. Code is as below.

<form method="post" action="https://www.Somewebsite.com">
	<input type="hidden" id="CustomerID" name="CustomerID" runat="server" value="1" />
	<input type="hidden" id="Amount" name="Amount" value="100.00" runat="server">
	<input type="hidden" id="InvoiceNO" name="InvoiceNO" runat="server" value="INV_001">
<input id="Submit1" type="submit" value="submit" runat="server">
</input></input></input></form> 
Posted
Updated 24-May-10 3:47am
v2

1 solution

That's not how one would use a Master Page.

The page you're trying to use is a sub-page (essentially) of the Master Page that already has the form defined: you simply need to supply everything else wrapped as follows (as an example):

XML
<%@ Page AutoEventWireup="True" Codebehind="Default.aspx.cs" Inherits="NameSpace.Default" Language="C#" MasterPageFile="~/Site.Master" %>
<asp:Content ID="contentMain" ContentPlaceHolderID="cphMaster" runat="server">
<p>Insert page content...</p>
</asp:Content>


Quite simplistically you would create code to redirect your page from the onclick of the submit button, either in code behind (by using an asp:Button control or form javascript or by whatever means you feel is appropriate for your process.

The page you have included above is stand alone and is not designed to be used from within a Master Page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900