|
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>
|
|
|
|
|
Good Day All
I hope someone can help me. i have a Asp.net web application that is running on 4.51 , When the User login Successfully i return an Object that has info for that user and store this in a Static object. Now my problem is the i
User 1 Login (Welcome James)
and
User 2 Login (WelCome Daniel)
and User 1 refreshes the Page (Welcome Daniel)
My user sessions override each other. i did mess around with the IIS Session before , i just noticed this now. Can anyone help.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Vuyiswa Maseko wrote: store this in a Static object.
There's your problem - static fields are shared between all threads for all requests to your application. When another user logs in, you replace the value of the static field, and all users will see the information for the last user to log in.
Use the user's Session[^] instead:
public static class UserInfoFacade
{
private const string UserInfoKey = "Some-Unique-Key-Here";
public static UserInfo GetUserInfo(this HttpContext context)
{
if (context == null) throw new ArgumentNullException("context");
HttpSessionState session = context.Session;
if (session == null) return null;
return (UserInfo)session[UserInfoKey];
}
public static void SetUserInfo(this HttpContext context, UserInfo info)
{
if (context == null) throw new ArgumentNullException("context");
HttpSessionState session = context.Session;
if (session == null || session.IsReadOnly)
{
throw new InvalidOperationException("Session is not enabled, or is read-only.");
}
session[UserInfoKey] = info;
}
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Lucky it was not in many places. so i changed the Static Objects to Session . i think i got comfortable with Silverlight model of Dev that uses Cookies and Static objects. All is resolved.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
hello guys! Can anyone help me on this error I'm receiving this error message. The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add to the system.web/httpHandlers section of the web.config file, or add to the system.webServer/handlers section for Internet Information Services 7 or later.
These settings of handlers are already exists in my asp.net project web config I can't understand why this error keeps showing though these settings is already in my web config.
Im using VS2012 and SQL 2008 - Thanks
|
|
|
|
|
Hi,
Have you already done the following ?
Add the following to <system.web> => <httpHandlers> section.
<add verb = "*" path = "Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
And,
Add the following to <system.webServer> => <handlers> section.
<add name = "ReportViewerWebControlHandler" preCondition = "integratedMode" verb = "*" path = "Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Also check this :
Report Viewer Configuration Error[^]
|
|
|
|