New Message on dotNET User Group Hyd

asp.net

Reply
  Reply to Sender   Recommend Message 6 in Discussion
From: rathod_s

Hi,
 
this code avoids the postback,but i need to get the values in session on button click and then open the child window.When i come back from child window i get those values from sessions.
 
So, i will need the postback on button click.
 
Help please.  Anything like session in _javascript_!!!!!!
 
Thanks.

SwapnilDeshmukh <[EMAIL PROTECTED]> wrote:
New Message on dotNET User Group Hyd

asp.net

Reply
  Reply to Sender   Recommend Message 5 in Discussion
From: SwapnilDeshmukh

Hi,

The below code might help you to solve your problem

--HTML Code starts here

<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false"
Inherits="Example.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="_javascript_">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script language="_javascript_">
function Callme()
{
win = window.open("depwin.html", "dep", "height=200,width=400");
return false;
}
function closeDep()
{

if (win && win.open && !win.closed) win.close();

}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout" >
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" runat="server"
Text="Button"></asp:Button>
</form>
</body>
</HTML>


--C# Code starts here

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Example
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button Button1;

private void Page_Load(object sender, System.EventArgs e)
{
Button1.Attributes.Add("onclick","return Callme();");
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion
}
}


Hope this helps u

Regards

Swapnil Deshmukh



View other groups in this category.


Yahoo! Mail
Stay connected, organized, and protected. Take the tour

View other groups in this category.

Click Here
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to