Click here to Skip to main content
15,435,740 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Visual Studio Team Suite UNIT TESTING Pin
Shameel11-Aug-11 4:59
professionalShameel11-Aug-11 4:59 
AnswerMy Vote of 1 Pin
Keith Barrow10-Aug-11 23:13
professionalKeith Barrow10-Aug-11 23:13 
QuestionHow to take Multiple instance of same Web User Control on Same PAge ...? Pin
_Tushar Patil10-Aug-11 0:47
Member_Tushar Patil10-Aug-11 0:47 
AnswerRe: How to take Multiple instance of same Web User Control on Same PAge ...? Pin
Shameel10-Aug-11 2:22
professionalShameel10-Aug-11 2:22 
GeneralRe: How to take Multiple instance of same Web User Control on Same PAge ...? Pin
_Tushar Patil10-Aug-11 2:24
Member_Tushar Patil10-Aug-11 2:24 
GeneralRe: How to take Multiple instance of same Web User Control on Same PAge ...? Pin
Shameel10-Aug-11 4:24
professionalShameel10-Aug-11 4:24 
GeneralRe: How to take Multiple instance of same Web User Control on Same PAge ...? Pin
Not Active10-Aug-11 5:46
mentorNot Active10-Aug-11 5:46 
GeneralRe: How to take Multiple instance of same Web User Control on Same PAge ...? Pin
Not Active10-Aug-11 6:04
mentorNot Active10-Aug-11 6:04 
C#
select_what = SELECT_WHAT;
 select_from_database = SELECT_FROM_DATABASE;
 search_text = SEARCH_TEXT;
 search_listbox_value_field = SEARCH_LISTBOX_VALUE_FIELD;
 condition_name = Condition_Name;
 matching_condition = Matching_Condition;


So you are assiging your private variables from ViewState each time the page is loaded? Why? Are the values set on the page anywhere? They will always be empty strings if not. If they are preset values there is no reason to use ViewState to store them. Do you understand what ViewState is any how to use it?

C#
cmdSearchCustomer = "select " + search_listbox_value_field + " ," + select_what + "   from " + select_from_database + "   where " + search_text + " like '" + txrsearch.Text + "%' And "+condition_name+"='"+matching_condition+"' ORDER BY " + select_what + " ASC";


Concatentating strings to form a SQL statement with unvalidated user input? WTF!?! Every heard of a SQL Injection Attack? Every heard of a parameterized query?


Each instance of the control placed on the page is sharing the smae ViewState and Session variables. If there can be multiple instances of the same control you need to take that in to account.

I know the language. I've read a book. - _Madmatt

GeneralRe: How to take Multiple instance of same Web User Control on Same PAge ...? Pin
Shameel10-Aug-11 9:36
professionalShameel10-Aug-11 9:36 
QuestionNUnitTest Pin
Satish_S9-Aug-11 23:55
MemberSatish_S9-Aug-11 23:55 
AnswerRe: NUnitTest Pin
Shameel10-Aug-11 2:20
professionalShameel10-Aug-11 2:20 
QuestionASP:Menu Text labels Pin
Christopher Hill9-Aug-11 6:20
MemberChristopher Hill9-Aug-11 6:20 
AnswerRe: ASP:Menu Text labels Pin
Morgs Morgan9-Aug-11 20:45
MemberMorgs Morgan9-Aug-11 20:45 
GeneralRe: ASP:Menu Text labels Pin
Christopher Hill10-Aug-11 4:33
MemberChristopher Hill10-Aug-11 4:33 
GeneralRe: ASP:Menu Text labels Pin
Morgs Morgan10-Aug-11 5:07
MemberMorgs Morgan10-Aug-11 5:07 
QuestionWith out SQL identity column inserting the datas, via asp.net Pin
Member 38798819-Aug-11 1:02
MemberMember 38798819-Aug-11 1:02 
AnswerRe: With out SQL identity column inserting the datas, via asp.net Pin
Not Active9-Aug-11 1:51
mentorNot Active9-Aug-11 1:51 
AnswerRe: With out SQL identity column inserting the datas, via asp.net Pin
Morgs Morgan9-Aug-11 20:40
MemberMorgs Morgan9-Aug-11 20:40 
AnswerRe: With out SQL identity column inserting the datas, via asp.net Pin
Tech Code Freak11-Aug-11 1:56
MemberTech Code Freak11-Aug-11 1:56 
Questioni want to make download link. Pin
buffering838-Aug-11 21:07
Memberbuffering838-Aug-11 21:07 
AnswerRe: i want to make download link. Pin
Shameel8-Aug-11 23:58
professionalShameel8-Aug-11 23:58 
AnswerRe: i want to make download link. Pin
Pravin Patil, Mumbai9-Aug-11 1:08
MemberPravin Patil, Mumbai9-Aug-11 1:08 
Questionمحدودیت لاگین Pin
sadiram8-Aug-11 20:55
Membersadiram8-Aug-11 20:55 
AnswerRe: محدودیت لاگین Pin
Richard MacCutchan8-Aug-11 21:13
mveRichard MacCutchan8-Aug-11 21:13 
QuestionCall script Pin
Rupert Koan8-Aug-11 1:32
MemberRupert Koan8-Aug-11 1:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.