I'm not sure why it wouldn't work after you'd added the Page.Validate()line, does it give an error? You've commented out the condition the condition, but you haven't commented out Label.Text = "OK" so every time you click the button it will set the labels text to OK regardless of what you do on the page.
RyanMorris
Posts
-
Page.IsValid conditional not working -
Page.IsValid conditional not workingHi BigMish2, You need to validate the page before you can tell if it's valid:
Page.Validate()
If Page.IsValid Then
Label.Text = "OK"
Else
Label.Text = "Bad"
End IfI hope this helps. Ryan
-
Help needed with javascript function for validating textbox dataHi Brendan,
.NET Enthusiast wrote:
What's wrong with 1234.234?
Sorry, I think I slightly misunderstood your question, I thought you wanted 3 digits each side of the decimal place. If that's not the case then you might want to try this instead: ^[-+]?\d+(\.\d{3})?$ - this will allow you to have as many numbers as you like in front of the decimal place but only 3 after it. To be honest I wouldn't have a clue how to reformat the number after losing focus on the text box, my javascript isn't very good. Sorry. All the expressions I've given you only except numbers. Thanks, Ryan
-
Help needed with javascript function for validating textbox dataHi Brendan, This might help: ^[-+]?[0-9]\d{0,2}(\.\d{1,3})?$ - this will allow numbers like 1, -1.1, 123.456 but not 1234.234, 123.4567 or 1234.4567. ^[-+]?[0-9]\d{2}(\.\d{3})?$ - this will only allow numbers like 123.456 or -123.246. I hope this helps. Ryan
-
validation controls [modified]Hi Sritha, You could use a custom validator to do this, this might help[^].
-
Obtain the checkedlistbox valueSorry, my mistake, I didn't realise it was a windows application. How about trying this:
Dim obj As Object
For Each obj In clb_employee.CheckedItems
strValue = obj.ToString
Next objHopefully this will work better for you.
-
Obtain the checkedlistbox valueHi Mc--Gann, The code bellow should help:
'loop through check box list
For i=0 To clb_employee.Items.Count - 1If clb_employee.Items(i).Selected Then
'Do something with the selected value
strValue = clb_employee.Items(i).Value.ToStringEnd If
Next
I hope this helps.
-
Querystring? urgentHi Karthick_gc, Have you tried doing it like this:
xmlHttp.open("GET","ResponserFile.aspx?id=" + id + "&name=" + nam + "&cell=" + cel + "&bool=true");
I'm assuming that id, nam and cel are variables. Then to retrieve the data on the form you would use:
Request.QueryString["id"]
Request.QueryString["name"]
Request.QueryString["cell"]
Request.QueryString["bool"]I hope this helps. Ryan
-
Why the Custom Validation is firing wronglyNo, you shouldn't need to change the code-behind.
-
Why the Custom Validation is firing wronglyHi meeram395, Validation groups might solve your problem. So if you change the first button and the custom validator like so:
and then for the second button and custom validator:
asp:CustomValidator ID="DocumentUploadedCustomValidator" runat="server" Display="Dynamic" ErrorMessage="CustomValidator" OnServerValidate="DocumentUploadedCustomValidator_ServerValidate" ValidationGroup="ValGroup2">
So the first button will only validate ValGroup1 and the second button will only validate ValGroup2. I hope this helps. Ryan
-
Sql Restore ErrorJust using the file you have, not as far as I know. If you had access to the database, I'm told that you could export the data from SQL 2005 and then import it into SQL 2000, but I haven't done this before and so I can't really tell you exactly how to go about it.
-
Sql Restore ErrorHi JK, It looks to me like you client is using SQL 2005, which isn't backwards compatible with SQL 2000. Ryan
-
Simple question about controlsSorry, my mistake. How about something like this:
Control myControl = new Control();
foreach (Control c in this.Controls)
{
if (c.Name == "lblName")
{
myControl = c;
}
} -
Simple question about controlsHi Fred, Would the following solve your problem:
lbl = new Label();
lbl = (Label)FindControl("lblName");Ryan