p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Professional (http://p2p.wrox.com/forumdisplay.php?f=215)
-   -   Master Page and Content Page with Java script (http://p2p.wrox.com/showthread.php?t=65643)

Harjinder February 1st, 2008 07:23 AM

Master Page and Content Page with Java script
 
Hi Everyone


I have the problem i want to read value from content page namely
default2.aspx to default3.aspx

please help

Default2.aspx Page Coding
Code:

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script language="javascript">
function abc()
{
  var e = document.getElementById('TextBox1');
  window.open("default3.aspx?ab= " + e.value.toString());
}
</script>


Default3.aspx Coding

 protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["ab"] == null)
            Response.Write("Sorry");
        else
            Response.Write(Request.QueryString["ab"].ToString());
    }

Please Help on i m very eager

    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" Text="Button" />
</asp:Content>

harjinder

planoie February 1st, 2008 10:31 AM

What exactly is the problem? What have you tested so far? Have you attempted to call your "abc" method? Where do you want to call that method from?

-Peter


All times are GMT -4. The time now is 11:26 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.