|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
prompt string?Button btn = new Button();
btn.Attributes.Add("onClick", "prompt(\"Enter name\")"); btn.Click += new EventHandler(this.ProcessName); How do I access string returned by javascript prompt function from inside of my ProcessName event handler? So this event handling occurs on the server right. But the script code
executes on the client. Even though it seems to be in the same line of code, the two events occur across an internet boundary. So what you are asking is really how to get the script value back on the server after the script has fired on the client. One approach is to catch the value on the client and assign it to a server side control so that it is submitted to the server as part of viewstate. -- Show quoteHide quoteRegards, Alvin Bruney - ASP.NET MVP [Shameless Author Plug] The Microsoft Office Web Components Black Book with .NET Now available @ www.lulu.com/owc, Amazon.com etc "Amelyan" <bamel***@wi.rr.com> wrote in message news:uRfoMBzfFHA.3912@tk2msftngp13.phx.gbl... > Button btn = new Button(); > btn.Attributes.Add("onClick", "prompt(\"Enter name\")"); > btn.Click += new EventHandler(this.ProcessName); > > > How do I access string returned by javascript prompt function from inside > of my ProcessName event handler? > >
I guess this can't be done can it ?
Unhappy call to a 2nd dataItem in ItemTemplate of an asp:TemplateC OWC11 (connect Spreadsheet + Chart) Complex CompareValidator Validations DataGrid and Paging. Textbox question (v2.0) Page is not submitted using Client side validation of.NET validato Button to link with DataGrid problems with activex controls on web page ie webcontrol tabstrip |
|||||||||||||||||||||||