Click here to Skip to main content
15,893,588 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralHi friends... Javascript debugging software tool Pin
G Nathan3-Apr-08 1:23
G Nathan3-Apr-08 1:23 
QuestionHi friends... Javascript debugging software tool Pin
G Nathan3-Apr-08 0:39
G Nathan3-Apr-08 0:39 
GeneralRe: Hi friends... Javascript debugging software tool Pin
rah_sin3-Apr-08 1:08
professionalrah_sin3-Apr-08 1:08 
Questionhow to configure or publish the .net 2005 web application Pin
M.Ramesh2-Apr-08 23:20
M.Ramesh2-Apr-08 23:20 
QuestionNested Data Web Controls Pin
RajeevKumarSharma2-Apr-08 21:57
RajeevKumarSharma2-Apr-08 21:57 
GeneralRe: Nested Data Web Controls Pin
N a v a n e e t h2-Apr-08 22:43
N a v a n e e t h2-Apr-08 22:43 
GeneralRe: Nested Data Web Controls Pin
rahul.net112-Apr-08 22:56
rahul.net112-Apr-08 22:56 
GeneralJavaScript in C# in ASP.NET... Pin
Reelix2-Apr-08 21:32
Reelix2-Apr-08 21:32 
For the current project I'm doing, I have to execute JavaScript from an ASP.NET Page, using C#...

Now, So far, the closest I've found is something like:



<br />
<input type="button" name="Button1" value="Button"><br />
             id="Button1" onclick="doAlert()" /><br />
<br />
<br />
<script><br />
    function doAlert()<br />
    {<br />
          alert("Message Here!");<br />
    }<br />
</script><br />
</input>


Which I REALLY don't like, as I have to create a custom button...

What I want to know is if it's possible to do JavaScript on the OnClick event of a Button on the Code Behind (.cs) page, so it isn't easily viewable in the Source, and is also easier to work with?

Something Like...

<br />
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)<br />
{<br />
    DoJavaScript("alert:('Message Here!');");<br />
}<br />


Any assistance would be greatly appreciated Smile | :)

Thanks!

- Michael
GeneralRe: JavaScript in C# in ASP.NET... Pin
Sandeep Akhare2-Apr-08 21:57
Sandeep Akhare2-Apr-08 21:57 
GeneralRe: JavaScript in C# in ASP.NET... Pin
N a v a n e e t h2-Apr-08 22:41
N a v a n e e t h2-Apr-08 22:41 
QuestionHow to catch Runtime errors and Log them on a ASP.NET project? Pin
pubududilena2-Apr-08 21:11
pubududilena2-Apr-08 21:11 
AnswerRe: How to catch Runtime errors and Log them on a ASP.NET project? Pin
eyeseetee2-Apr-08 21:19
eyeseetee2-Apr-08 21:19 
AnswerRe: How to catch Runtime errors and Log them on a ASP.NET project? Pin
Sandeep Akhare2-Apr-08 21:21
Sandeep Akhare2-Apr-08 21:21 
GeneralRe: How to catch Runtime errors and Log them on a ASP.NET project? Pin
Reelix2-Apr-08 21:36
Reelix2-Apr-08 21:36 
GeneralRe: How to catch Runtime errors and Log them on a ASP.NET project? Pin
Sandeep Akhare2-Apr-08 21:41
Sandeep Akhare2-Apr-08 21:41 
GeneralRe: How to catch Runtime errors and Log them on a ASP.NET project? Pin
Reelix2-Apr-08 21:47
Reelix2-Apr-08 21:47 
AnswerRe: How to catch Runtime errors and Log them on a ASP.NET project? Pin
N a v a n e e t h2-Apr-08 22:37
N a v a n e e t h2-Apr-08 22:37 
Questionhow to import data from excel to sql server 2005 Pin
ashok@techxygen2-Apr-08 20:40
ashok@techxygen2-Apr-08 20:40 
GeneralCross post - please ignore Pin
pmarfleet2-Apr-08 20:55
pmarfleet2-Apr-08 20:55 
GeneralRe: how to import data from excel to sql server 2005 Pin
Krishnraj2-Apr-08 20:58
Krishnraj2-Apr-08 20:58 
GeneralRe: how to import data from excel to sql server 2005 Pin
Sandeep Akhare2-Apr-08 21:06
Sandeep Akhare2-Apr-08 21:06 
AnswerRe: how to import data from excel to sql server 2005 Pin
ashok@techxygen3-Apr-08 0:21
ashok@techxygen3-Apr-08 0:21 
QuestionHow to dipsly a webform [modified] Pin
biswa472-Apr-08 20:12
biswa472-Apr-08 20:12 
GeneralRe: How to dipsly a webform Pin
pmarfleet2-Apr-08 21:01
pmarfleet2-Apr-08 21:01 
GeneralRe: How to dipsly a webform Pin
Krishnraj2-Apr-08 21:05
Krishnraj2-Apr-08 21:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.