Click here to Skip to main content
15,889,808 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to generate License Key in Web Application? Pin
Sandeep Mewara7-Mar-13 1:15
mveSandeep Mewara7-Mar-13 1:15 
AnswerRe: How to generate License Key in Web Application? Pin
jkirkerx7-Mar-13 7:09
professionaljkirkerx7-Mar-13 7:09 
GeneralRe: How to generate License Key in Web Application? Pin
jkirkerx8-Mar-13 7:59
professionaljkirkerx8-Mar-13 7:59 
QuestionRadWindow Problem on refreshing the page.. Pin
dayakar_dn6-Mar-13 16:29
dayakar_dn6-Mar-13 16:29 
AnswerRe: RadWindow Problem on refreshing the page.. Pin
Sandeep Mewara7-Mar-13 1:22
mveSandeep Mewara7-Mar-13 1:22 
Questiondisplay records through age in .net Pin
saitwal6-Mar-13 8:09
saitwal6-Mar-13 8:09 
AnswerRe: display records through age in .net Pin
ravithejag7-Mar-13 0:37
ravithejag7-Mar-13 0:37 
RantRe: display records through age in .net Pin
Richard Deeming7-Mar-13 0:57
mveRichard Deeming7-Mar-13 0:57 
ravithejag wrote:
CommandText = "select * from table t where t.age between"+startDate+" and "+endDate

Have you never heard of SQL Injection[^]? Suspicious | :suss:

Never use string concatenation to build a query, not even for a quick sample. Use a parameterized command instead:
C#
using (var connection = new SqlConnection("connection string here"))
using (var command = new SqlCommand("select * from table where age between @startdate and @enddate", connection))
{
   command.Parameters.AddWithValue("@startdate", startDate);
   command.Parameters.AddWithValue("@enddate", endDate);
   
   var adapter = new SqlDataAdapter(command);
   var table = new DataTable();
   adapter.Fill(table);
   return table;
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


Question90Meter SmartCard Manager Pin
Member 87055646-Mar-13 6:25
Member 87055646-Mar-13 6:25 
QuestionRetrieve Email Id from outlook and send as a response when the user opens the mail Pin
kumar.ranjith.k5-Mar-13 19:24
kumar.ranjith.k5-Mar-13 19:24 
AnswerRe: Retrieve Email Id from outlook and send as a response when the user opens the mail Pin
Richard MacCutchan5-Mar-13 22:44
mveRichard MacCutchan5-Mar-13 22:44 
QuestionRe: Retrieve Email Id from outlook and send as a response when the user opens the mail Pin
jkirkerx6-Mar-13 12:31
professionaljkirkerx6-Mar-13 12:31 
SuggestionMessage Closed Pin
5-Mar-13 19:19
ketan ovhal5-Mar-13 19:19 
GeneralRe: some important or useful Questions and answers Pin
Minal Joshi5-Mar-13 19:28
Minal Joshi5-Mar-13 19:28 
QuestionASP.NET Pin
Varadha Raj4-Mar-13 20:45
Varadha Raj4-Mar-13 20:45 
AnswerRe: ASP.NET Pin
Sandeep Mewara4-Mar-13 21:11
mveSandeep Mewara4-Mar-13 21:11 
GeneralRe: ASP.NET Pin
Varadha Raj4-Mar-13 21:42
Varadha Raj4-Mar-13 21:42 
AnswerRe: ASP.NET Pin
Sandeep Mewara4-Mar-13 23:00
mveSandeep Mewara4-Mar-13 23:00 
GeneralRe: ASP.NET Pin
Varadha Raj5-Mar-13 0:10
Varadha Raj5-Mar-13 0:10 
GeneralRe: ASP.NET Pin
Richard MacCutchan5-Mar-13 1:21
mveRichard MacCutchan5-Mar-13 1:21 
GeneralRe: ASP.NET Pin
Varadha Raj4-Mar-13 21:45
Varadha Raj4-Mar-13 21:45 
GeneralRe: ASP.NET Pin
Sandeep Mewara4-Mar-13 23:02
mveSandeep Mewara4-Mar-13 23:02 
GeneralRe: ASP.NET Pin
Varadha Raj5-Mar-13 0:02
Varadha Raj5-Mar-13 0:02 
AnswerRe: ASP.NET Windows Application Pin
Muhammad Aqib Shehzad5-Mar-13 0:55
professionalMuhammad Aqib Shehzad5-Mar-13 0:55 
GeneralRe: ASP.NET Windows Application Pin
Varadha Raj5-Mar-13 1:17
Varadha Raj5-Mar-13 1:17 

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.