How to fire mouse click event on pannel

Posted by Santosh.Choudhury under ASP.NET on 12/6/2012 | Points: 10 | Views : 1377 | Status : [Member] | Replies : 6
I have a panel which is Disabled mode.I want if user click anywhere in panel then it show a popup .




Responses

Posted by: Pavanandey on: 12/6/2012 [Member] Bronze | Points: 25

Up
0
Down
Since the panel is in disable mode how can we the user make a click on it

Thanks
Pavan Kumar
Mark Answer if this fits the need

Santosh.Choudhury, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santosh.Choudhury on: 12/6/2012 [Member] Starter | Points: 25

Up
0
Down
hi Pavan Kumar
Actually this button is inside the panel i want to enable the only button.beacuse if the user click the button i want show some message on popup

Santosh.Choudhury, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mutturaj on: 12/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Santosh,

Can u tell when u want to enable that button..??
Means, after any click event or mouse over on any elements like that.....

Santosh.Choudhury, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 12/7/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi Santosh,

Since the panel is in disable mode, the controls on the panel are not visbile to the user.
and for pop up on the user click on a button you can use the below given code


string strScript = "<script> ";
strScript += "var newWindow = window.showModalDialog('display.aspx", '','dialogHeight: 500px; dialogWidth: 900px; edge: Raised; center: Yes; resizable: Yes; status: Yes;');";
strScript += "</script>";
//Page.RegisterClientScriptBlock("strScript", strScript);
ScriptManager.RegisterStartupScript(this, this.GetType(), "PopupCP", strScript, false);

Thanks
Pavan Kumar
Mark Answer if this fits the need

Santosh.Choudhury, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 12/7/2012 [Member] Bronze | Points: 25

Up
0
Down
Plz Mark answer if this helps you

Thanks
Pavan Kumar
Mark Answer if this fits the need

Santosh.Choudhury, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sandhyab on: 12/12/2012 [Member] Starter | Points: 25

Up
0
Down
If U keep visible false ,Controls in panel wont be visible. To fire a pop up messege use this
 <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Check" Visible="true" Enabled="true"/>

protected void Check(object sender, EventArgs e)

{

Button1.Attributes.Add("onnclick", "return true");

string msg = "y";
Response.Write(msg);
string fun = "validate('" + msg + "')";
ScriptManager.RegisterStartupScript(Page, typeof(Page), "validate", fun, true);

}

Script:
  <script type="text/javascript" language="javascript">

function validate(msg) {
alert("Hi");

return true;
}

</script>


Santosh.Choudhury, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response