Jump to content

please help me


datla

Recommended Posts

I code in ASP.Net 2.0I used MasterPageI tried it but I can not get value.I tried this code:a Webpage in first server:Default.aspx:

<%@ Page Language="VB" MasterPageFile="~/submit_form/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="submit_form_Default" title="Untitled Page" %><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">	<script language="javascript" type="text/javascript">		function noPostBack(sNewFormAction)		{						document.forms[0].action = sNewFormAction;			document.forms[0].__VIEWSTATE.name = 'NOVIEWSTATE';			document.forms[0].submit();		}	</script>	<asp:TextBox runat="server" ID="txt" Text="here"></asp:TextBox>	<input type="button" id="btnSubmit" value="Submit Order" runat="server" onlick="noPostBack('http://localhost/Test/submit_form/Default1.aspx');" /></asp:Content>

The page in Another Server:Default.vb:

Partial Class submit_form_Default1	Inherits System.Web.UI.Page	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load		lbl.Text = Request.Form("ctl00_ContentPlaceHolder2_txt")	End SubEnd Class

This is my problem:When I submit from in first server.I can not get value from Default.aspx in first server.Please help me.thank you very much!

Link to comment
Share on other sites

On your master page what is the action value of the form???
I appears that the action is being set in the java script:
		function noPostBack(sNewFormAction)		{						document.forms[0].action = sNewFormAction;			document.forms[0].__VIEWSTATE.name = 'NOVIEWSTATE';			document.forms[0].submit();		}

To http://localhost/Test/submit_form/Default1.aspx. Is your second server running on localhost? And is the website called "Test"?

Link to comment
Share on other sites

My Master Page action value is : "http://localhost/Test/submit_form/Default1.aspx".

<input type="button" id="btnSubmit" value="Submit Order" runat="server" onlick="noPostBack('http://localhost/Test/submit_form/Default1.aspx');" />

and

function noPostBack(sNewFormAction){				  document.forms[0].action = sNewFormAction;	  document.forms[0].__VIEWSTATE.name = 'NOVIEWSTATE';	  document.forms[0].submit();}

yes. My second server running on localhost. And the website called "Test".thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...