|
Ya that's what i was thinking but i am very poor in Regular expressions so thought lets post it in CP.
No we are doing all validations aat server side only
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
playing with bugs ) wrote: No we are doing all validations aat server side only
Use Trim function and check the length. This will trim white spaces in the both end. You can add whitespace trimming in regular expression too. But I think it will remove the spaces in between the words (Sandeep Akhare)
playing with bugs ) wrote: i am very poor in Regular expressions
It's very interesting. Download RegExBuddy. It's a ultimate tool, and it helped me a lot to learn regular expressions.
|
|
|
|
|
N a v a n e e t h wrote: Download RegExBuddy
Thanks I will do that ...
N a v a n e e t h wrote: Use Trim function and check the length
That's what i am doing finally
// Check for blank spaces In both first and last Name fields
if (String.IsNullOrEmpty(txtFirstName.Text.Trim()))
{
this.reqFirstName.IsValid = false;
}
reqFirstName is my validator derived from custom validator
this line of code i am writing in my Pages not in validator
then question will be why i have used this validator.
i think its not proper implementation of validator
Any way thanks for your suggestions and providing me RE tool
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
use both requiredfieldvalidator and regularexpressionvalidator
|
|
|
|
|
|
hey man u want to validate any particular alphabate or blank space or both alphabate and blank
Piyush Vardhan Singh
|
|
|
|
|
Piyush Vardhan Singh wrote: both alphabate and blank
yes
PVS
it can have 0-9a-zA-Z. ,./()&'- these many alphabets but at same time it should not have just blank space i want regular expression for that
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
^[\w\s,./?;'":`!~@#$%^&*()+=|{}[\]-]{1,500}$
use this for alpha bate,it handle many validation for alphabet in regular expression. first u put this in regular expression validate r and see what happen ofter that arrange this according to ur requirements.
and for blank space use required validate r.
Piyush Vardhan Singh
|
|
|
|
|
Hi All,
I am trying to use the asp.net repeater with wml.Will it possible to use it. I choose a Mobile web form (.aspx) and tried to create it and add the asp:repeater to <mobile:form> but its not showing the <asp:repeater> tag in its lists. How to use <asp:repeater> for wml. Could anyone please tell me how to implement the asp:Repeater for wml.
Its very urgent.
Thanks,
Aruna.G
Aruna
|
|
|
|
|
hi
i am also not using asp:repeater in wml.
but u use alternet solution to use list or Objectlist control to display
no knowledge in .net
|
|
|
|
|
Hello
how to open the aspx page in new window when user click on button.
And tht aspx page contain dropdownlist and onselectedindexChanged should be fired in new window
can anybody suggest me the idea.
Thanks in advance.
|
|
|
|
|
You can use target="_blank" to make a link fire a new window. You can't make the event from one page fire in another, ASP.NET does not work that way. You can write javascrpt to notice when a selected index is changed and call javascript in a child window, which could create a postback in that page, but you can't do it just by hooking up events in the framework.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Learning ASP.NET wrote: how to open the aspx page in new window
Window.Open("NewPage.aspx");
Learning ASP.NET wrote: tht aspx page contain dropdownlist and onselectedindexChanged should be fired in new window
Do you mean selectedIndexChanged event should be fired in new window from parent window?
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
window.open("u.aspx?id="+document.getElementById("ddl").value,"NewWindow","width=250,height=20,location=400");
}
try this...
|
|
|
|
|
Hi guys,
In my project I have to use a text area in which the description is entered. I want to restrict the users to use the html and script tags. I would like to allow the following tags bold , break , paragraph and underline. What is the coding that I have to use? If anybody knows the answer or have any suggestions , please reply.
Thanks
Jith
|
|
|
|
|
Use a regular expression validator to not allow any other tags. Then make sure you also write code in your code behind to strip any other tags that may exist, as validators can be bypassed by a determined user.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have a Wizard control with in updatepanel . I am trying to create dynamic wizard steps in page pre_init event, but it is giving me an error " object reference not set to an instance of an object" . without updatepanel it's working properly.
Thanks in Advance
You can't do everything...
But you can do something...
So never refuse to do something that you can.....
|
|
|
|
|
Hello all,
I want to change/modify value of particular column (GridView). I am processing that code in RowDataBound by writing e.row.cells(index).text = <processed value>. Its working fine.
Now my columns are dynamic few should be visible=true and few false. So problem here is i cannot have its index or i cannot predefine them.
I tried to convert e.row.dataitem to datarowview and tried to change its value but its readonly.
How can i do so?
Thank you in advanced.
|
|
|
|
|
Hi
I dont want to see wrapping text on browser resizing. Like this window yo see now (Codeproject.com) I want that, when user resizing the browser window, horizontal scrollbar activate instead of text wrapping.
What should i do?
Tanx
|
|
|
|
|
You can set nowrap="nowrap" in <td tag
eg.
This is sample code testing for nowrap. This is sample code testing for nowrap. This is sample code testing for nowrap. This is sample code testing for nowrap. This is sample code testing for nowrap. This is sample code testing for nowrap. |
You can also have same with div tag.
This is sample code testing for nowrap. This is sample code testing for nowrap. This is sample code testing for nowrap. This is sample code testing for nowrap. This is sample code testing for nowrap. This is sample code testing for nowrap.
|
|
|
|
|
Tanx
It worked, however Asp.Net 2.0 said : A new construct is recommended.
regards
|
|
|
|
|
Give your table/controls width in %.
|
|
|
|
|
Tanx, But
Always i worked with % and it doesn't the answer.
|
|
|
|
|
is it possible to remove the text in the iframe.in iframe i having the text of html tags.i want this page to be cleared
|
|
|
|
|
document.getElementById("<iframeid>").src="about:blank"
OR
document.getElementById("<iframeid>").src=""
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|