|
Thank u for your response....
I'll try to do like you said!
Lakshmi
|
|
|
|
|
Hi,
I read in an MSDN article that we have to encode user input using HtmlEncode for security reasons. I used to do this many projects, but recently I encountered an issue. When the text is encoded it sometimes becomes huge that it exceeds the field length in database and db throws exception.
This is normal I suppose, is giving more length to db fields only solution for this?
Regards,
Blumen
“The thing for you is a burial permit. You have only to speak and I will see that you get it.”
|
|
|
|
|
Generally we do HTMLEncode when you need to disable javascripts to be running on the browser when it is shown in the web page.
I would suggest you to HTMLEncode before showing on the page rather than doing it while storing data into the database.
Why do you need to store the encoded string on the database.
Abhishek Sur
|
|
|
|
|
I encode data from Textboxes before saving them in database
“The thing for you is a burial permit. You have only to speak and I will see that you get it.”
|
|
|
|
|
Dont Encode before saving them in database. Rather, you should encode after you fetch from the database.
Abhishek Sur
|
|
|
|
|
hi,
i am doing a project which is just like google maps but my project is offline.so how will i do it.
coolsatty
|
|
|
|
|
What you mean by offline? Intranet application? Google map has some free and paid web services to get map data. Check Google documentation for more details.
|
|
|
|
|
Hi
I have to write some functions so i want to confirm whats better...
1. if i write one function with lot of functionalities
For exa.
Function Unit()
{
---- some code
-----
-------
---
----
.
.
.
}
2. if I break down this function in multiple functions and the call them inside the function and these function will be written in business layer.
For exa.
Function Unit()
{
---- some code
-----
Fun1(arg1,arg2)
---
Fun2(arg1,arg2)
.
.
.
}
Question 2 - is this a good practice (if not what are the drawbacks) or i must use directly Convert.ToInt16(oData).
****I am calling this at so many places
public static short ConvertToShort(object oData)
{
if (oData.ToString() == "")
{
return 0;
}
else
{
return Convert.ToInt16(oData);
}
}
Thanks
Dinesh Sharma
|
|
|
|
|
For 1st Q:
Regading performace both are almost same but for better managebility it always preferred to split in functions so that every function implement one feature.It's good practice.
for 2nd :
It'll be better if u use directly Convert.ToInt16(oData).but do use it in Try catch block cause if this function will not be able to convert it in int then it'll throw exception.
Cheers!!
Brij
|
|
|
|
|
Thanks for your reply...but
are you sure the breaking of functions will not affect the performance (speed)
Dinesh Sharma
|
|
|
|
|
As I said, It is almost same.When we do something there is a tradeoff associated.Breaking it into multiple function will just add very few LOC in if you convert it in Machine language.Those lines won't take significant time.But this will surely help u a lot while managing the code which is more important.
Also,You can prioritise and implement as per your requirement.
Cheers!!
Brij
|
|
|
|
|
while writing text in the iframe it is getting correctly .but when appending the text to the iframe through vb code it is getting every time paragraph tag and the text is appending in the down how can i sole this problem
|
|
|
|
|
Can we override machine.config ? if yes means can u give some example how to override .
|
|
|
|
|
When you apply any setting on web.config, you are overriding the default machine.config settings.
|
|
|
|
|
whatever the setting you want to override define it in your applcations web.config file.
Dinesh Sharma
|
|
|
|
|
can u give some example hoe to mention
|
|
|
|
|
The following code will replace the machine.config settings for session state
<sessionState timeout="525600" cookieless="UseCookies" mode="InProc"/>
Dinesh Sharma
|
|
|
|
|
can any one tell how to handle mouse events in asp.net....
|
|
|
|
|
You can do it using client scripts (JavaScript).
|
|
|
|
|
i am using a datalist and want to check single or double click when an button is present in it.
modified on Monday, November 3, 2008 9:59 PM
|
|
|
|
|
You can handle the single click through ASP.NET itself. Just edit the template and double click the button, it automatically takes you to the codebehind. Double click can be handled through JavaScript only. Since you need both, better handle both through JavaScript and fire the Postback from the client script.
|
|
|
|
|
can u give example for it by using code ???
|
|
|
|
|
can i use any windows API like user32.dll for cheking mouse click event(single click or double click)..
|
|
|
|
|
pls i need codes on how to save & retrieve images using C# with SQL 2005 or MySql database.
Any response will be highly appreciated.
lilvbong
|
|
|
|
|
we are not her eto do your homework. pls do some coding and if you face any problem tell us, we are here to solve your issues.
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|