Yes, I am having the button attributes in Page_load, the following code doesn't work, anything wrong?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Load
If (Not Page.IsPostBack ) Then
If Me.textbox1.Tex t Is Nothing Or Me.textbox1.Tex t = "" Then
btnContinue.Att ributes.Add("on click", "return confirm(' message 1 ');")...
User Profile
Collapse
-
confirm box doesn't work in ascx
I am doing some validation in an ascx page. I have two textboxes. if user types char in the box, an alert box will be displayed, if user doesn't enter anything, a confirm box need to be displayed. Alert box works now, but confirm box doesn't work. my code:
...Code:Protected Sub btnContinue_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnContinue.Click If (textbox1.text <> "" And
Last edited by Curtis Rutland; Sep 26 '08, 03:47 PM. Reason: Added Code Tags - Please surround your code with [CODE] and [/CODE] -
javascript in usercontrol ascx file
i want to add a javascript validation in a ascx page. i have a checkbox and a textbox in this page, if user clicks the submit button without checking a box ,nor entering anything in the textbox, a alert message should be pop up.
I also have master page in the whole system.
Can anyone help me please?
Thank you soooo much.
No activity results to display
Show More
Leave a comment: