|
Syed Ali Raza wrote: How can i optimize the HTML through Code
There are many methods. I believe CP has some excellent articles on this subject. Try doing a search. I'd suggest the following
1 - Disable viewstate if it is not required
2 - Implement lazy loading kind of stuff using AJAX. So you won't load unnecessary data on page load,
3 - Don't use tables for page outlining. If you are using, make it small. Don't wrap whole content in one table. Browsers can render the content only after getting the end element. So wrapping the whole content in a single table will make rendering slow.
4 - Don't use DataGrid/GridView unnecessarily. Try with some lightweight controls like repeater.
many more..
|
|
|
|
|
Hi Coders,
I use Update Panel in my Page. there is a textbox having property password type when the page refresh the password in that textbox get disappear.I want to show that password all time.
Any Help would be appreciated.
Gautam
|
|
|
|
|
u can store password in a cookie
|
|
|
|
|
|
|
I think because it is a password type textbox it wont save the text typed in.
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
I know this but tell me how can I overcome this problem
|
|
|
|
|
Check this Thread out it might help you
Password Textbox
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
|
Your question doesn't suit this forum. Its not ASP.NET question. please go to proper forum for better answer
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
Well, you obviously didn't like my answer when you asked this last time, but I'll still try and give you one last chance. If you are using SQL Server there is no such instruction as LOCK [TABLE].
As you are obviously not that familar with SQL I suggest you do some reasearch before playing with isolation levels. After using relational databases for the best part of 20 years I can count on the fingers of both hands the number of times I have had to alter the default isolation levels to achieve simple locking.
Finally, to repeat myself one more time, if you lock a record when a user starts to VIEW it you are asking for problems. What if they leave it on their screen and go for lunch or go home? Nobody else will be able to do anything with it.
Simple rule of thumb, aquire locks late and release early.
Good luck, you will need it.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I am writing test cases using NUnitAsp, am unable to inherit the class WebFormTestCase Class into my tsetscalss.
Am i missing any reference or what?
Please, can anyone help me?
|
|
|
|
|
How to create a PDF file using ASP.NET
|
|
|
|
|
Get it
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hi,
I want to encrypt a password and insert it into SQL DB
and then discrypt it for sending it to user .
how could i do it
Thanx n regards
Amit sahu
|
|
|
|
|
Hi Amit,
There are lots of javascripts available to encrypt/decrypt passwords.
They come in combinations for encrypt/decrypt. apply encrypt script when u insert password. and decrypt while u r checking.
U can use only incrypting script only and check incrypted version of password directly with database. thus your original decypted password never travells through network and no possibility to be hacked via channel.
Just type "Encrypt Password + Javascript" in goole and u will get tons of scripts. u can prepare urself also simple script like replace "D" with ASCII(D) --> ASCII(D) + 25.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
hi Amit,
Forgot to tell one thing more. IF u use javascript for that , dont write JS function inline with HTML... because then ur script will be exposed to client machine.
Instead of that write JS function in separate Javascript ffile and include that file in ur html.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
thanx anand
a js file can also be get by just write the url
by getting the name of js file from source view of html page.
Is there is no such C# code that will help me
|
|
|
|
|
U can set the acces parameter anyways..
or if u doubt this way.. then u can crate your own method and steps in cs file also. just like first add any number in ASCII code of character then subtract any fix number then add/multiply/divide or anything..
I advice u to create your own steps and do exactly reverse steps to decryt.
That would be simplest and best for u.
Anand Desai
Developer
Atharva Infotech
|
|
|
|
|
thanx once again ............
for helping me and interest..
i'll try it and yes its a good way
|
|
|
|
|
Note that this is not encryption, it's only scrambling. An encrypted password is hard to crack, a scrambled password is not.
Also, any solution involving Javascript is totally unsafe. Any Javascript that the browser uses can easily be viewed and debugged using well-known tools like FireBug. Internet Explorer 8 will come with a similar tool built in.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
There is a method to encrypt a password,but it can't discrypt.
string pass = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(tbPass.Text, "MD5");
If you want to find pass,you can reset pass when user have answered your question rightly.
studing is processing in this life.
|
|
|
|
|
thanx nyeying
But i have already use this FormsAuthentication.HashPasswordForStoringInConfigFile()
method in my code
now the problem here is on forget password . i have to send it to user mail it, but i can't able to discrypt it
|
|
|
|
|
The purpose of hashing the password is that noone can read it. The price that you pay is that you can't read it yourself, so if the user has lost the password, you have to set a new password.
If you want to be able to read the password, you can use encryption instead of hashing. Look in the System.Security.Cryptography namespace.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
"MD5" only can encrypt,but discrypt.If you want to find old password,it is impossible.The only method is set a new password,then you send it to user's email.
studing is processing in this life.
|
|
|
|