|
Are you trying in JavaScript?
If so, try with onkeydown or onkeypress event of the TextBox... This is applicable to JavaScript only...
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
tested works and omg , should have seen that ...
|
|
|
|
|
hey, i need to do form validation. need to check if fields are empty,valid email format, postal code n things like this.. how can i integrate requiredFormValidaton and regularExpression in such it will inform user if its empty n once it is filled in but input wrongly, it will only inform user of incorrect input?
|
|
|
|
|
You can use more than one type of validation controls for one controls.
Example: You use requiredfieldvalidator for the textbox for zipcode which check if the textbox value is empty. and to check the format of zipcode value you use regularexpression validator control which will check the format of the zipcode value.
Now whenever validation occurs first requiredfieldvalidator will work. If the controls is not having blank value then the regularexpressionvalidator will check the format of value and gives u error if format is not in proper way.
Thanks and regards,
Chetan Ranpariya.
|
|
|
|
|
gd afternoon, tks. But how will i format the validator for display purposes? i cant overlap the 2 validator am i right?
|
|
|
|
|
I would like to know the difference between publishing and deploying an asp.net web application.
Regards
MLNRao
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
previously we were using visual studio 2002 version and in that version we were having no problems in moving the controls over the form in design time with grid layout.we simply drag and drop the control and move it over the form but in vs 2005 version the controls are not moving over the form with mouse and with keyboard in design time. so please give me the solution of this problem.
|
|
|
|
|
Unlike earlier version, VS2005 needs a strucred format for placing controls on it. So use table, div/layer tags for positioning elements.
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
Hi,
There are two ways to move a control anywhere in the form
1) Goto Tools-->Options and select HtmlDesigner then choose your options to "Absolutely Positioned".
2) Right click over a particular control select style then select position there also you can choose a position to "Absolutely Positioned". Test for all Choices.
|
|
|
|
|
Hai to all,
Here my doubt is ,when we enter some value into textboxes,i want to enter only numerics.
SAme i have to check for Characters,emailAdress(Havinv @ symbol in between).
How to do without using Required Field validator.Give me solution for three different cases.
Thanks in advance
kissy
|
|
|
|
|
Why do u not want to use Required Field Validator. U can use Regulsr Expresssion Validator for all three here u find for accepting only numeric value code. otherwise use Jscript.
asp:RegularExpressionValidator ID="REV_Seats" runat="server" ErrorMessage="* Number Only" ValidationExpression="[0-9]{1,16}" ControlToValidate="txtSeats" Display="Dynamic"
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Hai,
Thanks for ur answer,how to do for email address???
If i have more than 20 text boxes in a form for different entries,is it good to use the regular expression???
give me answer.
thanks
kissy
|
|
|
|
|
hi
u can use also RegularExpression for email Validation. follow the RegularExpression basic property and after tht use ValidationExpression into property windows and select Internet email address option click ok.
and if u hav 20 and more controls in a page tht is good to use coz tht validation is run at client side and prevent to user to goto server side.
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Hi Guys,
..am beginner in asp.net....I want to delete the row in my gridview.... i am using this code but where i place the code to delete the row....
dataset.Tables["Data"].Rows.RemoveAt(e.RowIndex);
gridview.DataSource=dataset.Tables["Data"];
gridview.DataBind();
Thanks
A.Rajapandian
|
|
|
|
|
Try it in RowDeleting Event of the GridView...
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
when i run localhost, it right, but when i run with network, it not display persons conmect this website.
please help me.
Thanks you.
|
|
|
|
|
What specifically is it that you are trying to count?
If it doesn't display "persons conmect this website", what does it show?
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
i created a calender control with checkbox,i even written a code for checking the checkbox,but i checked the checkbox the date is not getting displayed,execution of code is not getting into the 'if ' condition but into the else condition.if any wuld get help me on it as i am new to asp.net.
thanks in advance
|
|
|
|
|
Post your coding, if possible....
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
here is my code.
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (cb != null)
{
if (cb.Checked)
{
lblcal.Text = Calendar.SelectedDate.ToShortDateString();
}
//else
//{
// lblcal.Text = "No Date is Slected!";
//}
}
Response.Write("The selected date is :" + Calendar.SelectedDate.ToShortDateString());
}
but i am getting the date as 1/1/0001 when i check any date in calender.
thanks for reply
|
|
|
|
|
You have to set the SelectedDate property of the Calendar Control or you must select a date before clicking the button... I hope the problem will be solved now...
Have a nice day...
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
Thanks for reply but i am unable to set that property as u said if possicle make changes in the code n send it to me.thanks
|
|
|
|
|
Why? Whats the problem? SelectedDate is property available for Calendar Control. You can set it through the property box...
Or go the Source Code mode and find that Control's HTML tag and add the SelectedDate attribute as
<asp:Calendar ID="Calendar1" runat="server" SelectedDate="2007-01-03"></asp:Calendar>
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|
|
i Did that but i want the date which i check through the checkbox.example if i select the check of the date 3 jan 2007 then it shuld display that date with mess the selected date is 3/1/2007
|
|
|
|
|
Hey hold on...
Are you using Check boxes for each date? (i.e.) chk1 for day 1, chk2 for day 2.. something like that? If so, you should get each checkbox in the Calendar Control and check whether it is checked or not...
Can you post the HTML of your application, so that I could get a clear idea where we are...
Regards,
Venkatesh Mookkan.
Software Engineer, India
|
|
|
|