| Author: Alwin Durairaj 06 Jul 2004 | Member Level: Bronze Points : 0 |
Hi I tried ur logic, but it does not work well.
Whenever i execute this code it diplays the script language in browsers window. Instead of displaying message box.
Could u help me to display the message box using ur logic.
I have attached my html part and code behind given below
aspx file
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="my_web_al2.WebForm1" %>
WebForm1
code behind file
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 my_web_al2 { /// /// Summary description for WebForm1. /// public class WebForm1 : System.Web.UI.Page { protected System.Web.UI.WebControls.Button Button1; private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here }
#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); } /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load);
} #endregion } }
Hope u do ur best as soon as possible. with good cheers, Alwin
|
| Author: Siddarth Tamagond 14 Apr 2005 | Member Level: Bronze Points : 0 |
Hi Alwin Durairaj, The code is correct , It will work fine, if u just remove the space while opening the tags and closing the tags, or just copy & paste the below code, I removed it.
<%@ Page Language="C#" %> ";
if (!IsClientScriptBlockRegistered("alert")) this.RegisterClientScriptBlock("alert", alertScript); }
(14 Apr 2005)
|