Raising popup in asp.net [Resolved]

Posted by Maheshvishnu under ASP.NET on 9/21/2012 | Points: 10 | Views : 1252 | Status : [Member] | Replies : 3
I am new to dotnet.

give an example of raising popup in asp.net

mahesh


Responses

Posted by: Hariinakoti on: 9/21/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi Maheshvishnu,
see this link
http://www.codeproject.com/Articles/34996/ASP-NET-AJAX-Control-Toolkit-ModalPopupExtender-Co

Thanks & Regards
Hari

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

Posted by: Vikash on: 9/21/2012 [Member] Starter | Points: 25

Up
0
Down
You are capturing user action via popup, you will most likely use client side scripting to get the user input. Once you get the user input, you can set it to some control in your form which will get sent to your server when the form is submitted.

<div><asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="HiddenField1.value = prompt('Enter your feedback','');" /><asp:HiddenField ID="HiddenField1" runat="server" /><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></div>

This code handles the user input on the server side. (In this case, it simply displays it in a label, but at this point you get to decide what to do with it.)

protected void Page_Load(object sender, EventArgs e)
{
if(IsPostBack)

{
Label1.Text = HiddenField1.Value;
}
}

The button has a client script calling the prompt function. The value returned by the prompt function is set to the value of the hidden field, which gets submitted to the server.

NOTE: In production code, you have to validate the user input.

Regards,
Vikash Pathak

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

Posted by: Hariinakoti on: 9/21/2012 [Member] Starter | Points: 25

Up
0
Down
if u satisfy with my answer plz Mark as Answer

Thanks & Regards
Hari

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

Login to post response