|
7 if you include the space.
|
|
|
|
|
Maybe this is where an idea comes in that I read about some time ago. It was talking about localization, specifically for number-based data such as postal/zip codes and telephone numbers. It went on to say that basically, you don't store the formatted data. You store the numbers only. No spaces, no hyphens, etc. That makes it simple to localize the data when presenting it on the user's screen, and I'm sure it makes a difference in validation as well.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
That's quite right. But in the UK plenty of organisations seem to get confused about it. Some insist that you don't include the space, and some insist you do. So I guess plenty of developers have not read the article you refer to.
|
|
|
|
|
The SPACE isn't part of the code.
|
|
|
|
|
In such a thing there are two levels of validation. One is for the format and the other is for the value...
Like in email...the email my_mail@nowhere.com is perfectly valid in manner of format, but hard to believe anyone will answer you from it...
The same for US zip codes, it can be easily validated for format using regex, as it or a 5 digit number or a 5 digit + hyphen + 4 digits number. However not all validly formatted zip codes are real zip codes...
If you read carefully you may came to a - fairly complicated - regex that validate not only format, but also value (I have done that for Israeli phone numbers, so it is possible as long you have some rules) - http://en.wikipedia.org/wiki/ZIP_code#Structure_and_allocation[^]
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
תפסיק לספר לה' כמה הצרות שלך גדולות, תספר לצרות שלך כמה ה' גדול!
|
|
|
|
|
You don't determine the postal or zip code country
You let the user select the country, in the mailing address, and based in the selection, you run the proper validation regex.
|
|
|
|
|
Hi,
I want to encrypt a password at client side (javascript) and decrypt the password again in the server side (Asp.Net).
Please give me a sample or the best algorithm to do that.
Thanks All
|
|
|
|
|
No, you don't, passwords should be hashed not encrypted. If you can decrypt the password then so can a hacker.
|
|
|
|
|
Since the encryption key will be needed by both client and server, how will be able to share the key with both without exposing it to the hacker community at large? The answer is that you cannot, especially since the client will likely have the decryption key (or same key if you're using symmetric encryption) exposed and vulnerable.
As Richard suggested, use a hash algorithm instead, so that you can perform the same hashing on the server and then compare the hash values on the server-side. Just do a search for JavaScript hashing functions and use the corresponding algorithm built into .NET.
Christopher Reed
"The oxen are slow, but the earth is patient."
|
|
|
|
|
Get an SSL[^] certificate installed on your site, and make sure your page is only loaded over HTTPS[^].
That way, the system automatically encrypts any communication between the client and the server, and your code doesn't need to change.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Most logical answer given the information.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
using multiline text box. trying to set width in px. but it's not working.
Need Help.
<asp:textbox id="txtHtml" textmode="MultiLine" runat="server" height="300px" width="839px">
Thanks in Advance.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
<asp:textbox id="txtHtml" textmode="MultiLine" runat="server" height="300px" width="839px">
It should work now!
|
|
|
|
|
hi thanks for your reply. Problem is width is display in design time, but different size is shown in runtime.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
I didn't get you.. can u send the pics?
|
|
|
|
|
|
Use your browser's developer tools to inspect the generated <textarea> element. You probably have other CSS styles overriding the width.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
<asp:textbox id="txtHtml" textmode="MultiLine" runat="server" height="300px" width="839px">
It should work as per syntax. May be there is some style is defined for textbox in any external css file that's why it is overriding the width during runtime.
So, add css class to override width in Multiline textbox.
|
|
|
|
|
You can use Columns property to increase with for multiline texxbox.
<asp:textbox id="txtID" runat="server" textmode="MultiLine" columns="50" rows="5">
|
|
|
|
|
Hi to every buddy
i have a table like this
<table>
<tr>
<td style border=1> test <sub>1</sub> </td>
<td style border=1> test2 <sub>2</sub> </td>
</tr>
</table>
i want have another number in each td elemet in top and Left Of each td.
is there a tag for do this like sub tag ? if no how can do this?
thank for any idea
|
|
|
|
|
The sub is for chemical text and stuff like that
H2O
What is top left, it can mean many things to me.
Besides, that an HTML question, really has nothing to do with asp.net
|
|
|
|
|
Haven't you tried
<sup> This tag defines superscript text.
Example,
<p><sup>23</sup>text contains <sub>4</sub></p>
Output is : 23text contains 4
I guess this what you mean by "top and left of each td". thanks
|
|
|
|
|
thanks you save my life with this good solution 
|
|
|
|
|
Hi
Probably you want to show data in this notation
1 Data 1
Then try with following code
<table>
<tr>
<td border="1"><sup>1</sup> test1 <sub>1</sub> </td>
<td border="1"><sup>2</sup> test2 <sub>2</sub> </td>
</tr>
</table>
|
|
|
|
|
You can use sup tag
<table>
<tr>
<td style border=1><sup>2</sup> test <sub>1</sub> </td>
<td style border=1><sup>3</sup> test2 <sub>2</sub> </td>
</tr>
</table>
|
|
|
|