Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Can't get popup box to show in on_click method

$
0
0

I have a button and on its EditData_click event method I call I want to create a javascript popup box and display it on the screen.

Here is what I'm doing but the box doesn't popup!

protected void EditData_Click(object sender, EventArgs e)
        {
            // don't allow edit to be made after current effective date has passwed
            if (EffectiveDate2.SelectedIndex != 0)
            {

                string script = "<script type=\"text/javascript\">alert('abc');</script>";
                ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", script);

                return;
            }
        }


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>