Click here to Skip to main content
15,918,041 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionXML tag & recordset not working in firefox Pin
Member 819658023-May-12 1:19
Member 819658023-May-12 1:19 
AnswerRe: XML tag & recordset not working in firefox Pin
jkirkerx23-May-12 9:16
professionaljkirkerx23-May-12 9:16 
QuestionCheck for repeated characters Pin
padmanabhan N22-May-12 22:10
padmanabhan N22-May-12 22:10 
AnswerRe: Check for repeated characters Pin
Not Active23-May-12 2:32
mentorNot Active23-May-12 2:32 
AnswerRe: Check for repeated characters Pin
jkirkerx23-May-12 13:01
professionaljkirkerx23-May-12 13:01 
GeneralRe: Check for repeated characters Pin
Not Active23-May-12 13:16
mentorNot Active23-May-12 13:16 
GeneralRe: Check for repeated characters Pin
jkirkerx24-May-12 5:10
professionaljkirkerx24-May-12 5:10 
AnswerRe: Check for repeated characters Pin
markovl23-May-12 21:07
markovl23-May-12 21:07 
QuestionScope For Hospital Management Pin
santosh_pathak22-May-12 21:51
santosh_pathak22-May-12 21:51 
AnswerRe: Scope For Hospital Management Pin
Sandeep Mewara22-May-12 23:44
mveSandeep Mewara22-May-12 23:44 
GeneralRe: Scope For Hospital Management Pin
santosh_pathak23-May-12 0:13
santosh_pathak23-May-12 0:13 
AnswerCross posted from design forum Pin
Pete O'Hanlon23-May-12 0:20
mvePete O'Hanlon23-May-12 0:20 
QuestionVSTO Pin
Ramkumar_S22-May-12 19:49
Ramkumar_S22-May-12 19:49 
AnswerRe: VSTO Pin
Not Active23-May-12 2:36
mentorNot Active23-May-12 2:36 
QuestionApproach on getting rid of server side validation Pin
Fabio Franco22-May-12 12:13
professionalFabio Franco22-May-12 12:13 
AnswerRe: Approach on getting rid of server side validation Pin
jkirkerx23-May-12 6:49
professionaljkirkerx23-May-12 6:49 
GeneralRe: Approach on getting rid of server side validation Pin
Fabio Franco23-May-12 7:23
professionalFabio Franco23-May-12 7:23 
GeneralRe: Approach on getting rid of server side validation Pin
jkirkerx23-May-12 10:04
professionaljkirkerx23-May-12 10:04 
GeneralRe: Approach on getting rid of server side validation Pin
Fabio Franco23-May-12 10:19
professionalFabio Franco23-May-12 10:19 
GeneralRe: Approach on getting rid of server side validation Pin
jkirkerx23-May-12 11:44
professionaljkirkerx23-May-12 11:44 
GeneralRe: Approach on getting rid of server side validation Pin
Fabio Franco23-May-12 16:14
professionalFabio Franco23-May-12 16:14 
GeneralRe: Approach on getting rid of server side validation Pin
jkirkerx24-May-12 5:37
professionaljkirkerx24-May-12 5:37 
GeneralRe: Approach on getting rid of server side validation Pin
Fabio Franco24-May-12 8:32
professionalFabio Franco24-May-12 8:32 
AnswerRe: Approach on getting rid of server side validation Pin
vvashishta25-May-12 2:41
vvashishta25-May-12 2:41 
QuestionJavascript and code-behind button events Pin
MattFFunke22-May-12 6:13
MattFFunke22-May-12 6:13 
I'll try to condense this as much as I can and include only the relevant information.

This works:
C#
protected void Page_Load(object sender, EventArgs e)
{
    string hey = "<script language=JavaScript>alert(\"Agh!\");</script>";
    this.RegisterClientScriptBlock("key", hey);

... much snipped for brevity ...

... but this doesn't:
C#
 ... in Page_Load():

    Button saveStart = new Button();
    saveStart.Text = "Save";
    saveStart.Click += new System.EventHandler(Save_Click);
}

protected void Save_Click(object sender, EventArgs e)
{
    CheckInitialization();

... much snipped for brevity...

protected void CheckInitialization()
{
    if (i == 64)
    {
        string hey = "<script language=JavaScript>alert(\"Agh!\");</script>";
        this.RegisterClientScriptBlock("key", hey);

... much snipped for brevity...

Any idea why not? I've run it through the debugger and verified that the "if" conditional is entered. For some reason, though, I don't see the alert box in the second code.

Am I opening it on the server, perhaps? If so, what can I do with RegisterClientScriptBlock to get it to run on the client?

I'd appreciate any insight you could lend.

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.