Click here to Skip to main content
15,878,809 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Weird issue with input form on a simple ASP.NET core web application Pin
Maximilien27-Mar-23 6:12
Maximilien27-Mar-23 6:12 
QuestionMessage Removed Pin
19-Mar-23 17:21
samflex19-Mar-23 17:21 
QuestionNeed to Integrate Swipe Machine in my C# Application for billing Pin
Member 159385451-Mar-23 0:58
Member 159385451-Mar-23 0:58 
AnswerRe: Need to Integrate Swipe Machine in my C# Application for billing Pin
Richard Deeming1-Mar-23 1:07
mveRichard Deeming1-Mar-23 1:07 
AnswerRe: Need to Integrate Swipe Machine in my C# Application for billing Pin
jschell20-Mar-23 6:40
jschell20-Mar-23 6:40 
QuestionUsing the WebControlAdapter class with WinForms and ASP.NET 4.5.2 Pin
WhoPinchedMyName28-Feb-23 7:43
WhoPinchedMyName28-Feb-23 7:43 
QuestionI want to show the first lettter of token to be upercase in my code, but it then show the page name and not the token name Pin
hendrikbez23-Feb-23 0:25
hendrikbez23-Feb-23 0:25 
AnswerRe: I want to show the first lettter of token to be upercase in my code, but it then show the page name and not the token name Pin
hendrikbez26-Feb-23 3:24
hendrikbez26-Feb-23 3:24 
Questionhow to auto print label in vb to be in the database Pin
IsdKirti L&tSou20-Feb-23 0:06
IsdKirti L&tSou20-Feb-23 0:06 
AnswerRe: how to auto print label in vb to be in the database Pin
Richard Deeming20-Feb-23 0:45
mveRichard Deeming20-Feb-23 0:45 
QuestionIs it possible to use OData in local mode? Pin
Alex Wright 202217-Feb-23 21:28
Alex Wright 202217-Feb-23 21:28 
QuestionHow to enable nested json result in OData (ASP.NET Core API) Pin
Alex Wright 202214-Feb-23 20:57
Alex Wright 202214-Feb-23 20:57 
AnswerRe: How to enable nested json result in OData (ASP.NET Core API) Pin
Richard Deeming14-Feb-23 22:11
mveRichard Deeming14-Feb-23 22:11 
GeneralRe: How to enable nested json result in OData (ASP.NET Core API) Pin
Alex Wright 202214-Feb-23 22:33
Alex Wright 202214-Feb-23 22:33 
Question(SOLVED) Having problem showing just a section of a page. Pin
samflex16-Jan-23 10:40
samflex16-Jan-23 10:40 
SuggestionRe: Having problem showing just a section of a page. Pin
Richard Deeming16-Jan-23 22:11
mveRichard Deeming16-Jan-23 22:11 
samflex wrote:
VB.NET
Dim sqlStatement As String = "Select o.PrimaryFirst, o.PrimaryLast, ap.applicant, FORMAT(ap.DateReceived, 'd','us') as DateReceived,o.SecondaryFirst,o.SecondaryLast,ad.InstallAddress,ad.InstallCity, ad.InstallState, ad.InstallZip, ad.WaterAcctNo from Applications ap "
sqlStatement += "inner Join Addresses ad on ap.WaterAccountNo = ad.WaterAcctNo inner join Owner o on ap.OwnerCode = o.OwnerID Where ad.InstallAddress Like '%" & address.Replace("'", "''").Trim() & "%'"
Your code is almost certainly vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query.
VB.NET
Const sqlStatement As String = "Select o.PrimaryFirst, o.PrimaryLast, ap.applicant, FORMAT(ap.DateReceived, 'd','us') as DateReceived, o.SecondaryFirst, o.SecondaryLast, ad.InstallAddress, ad.InstallCity, ad.InstallState, ad.InstallZip, ad.WaterAcctNo from Applications ap inner Join Addresses ad on ap.WaterAccountNo = ad.WaterAcctNo inner join Owner o on ap.OwnerCode = o.OwnerID Where ad.InstallAddress Like @query"

Using sqlCmd2 As New SqlCommand(sqlStatement, myConnection)
    sqlCmd2.Parameters.AddWithValue("@query", address.Trim())
    Using reader As SqlDataReader = sqlCmd2.ExecuteReader()
        If reader.HasRows Then
            div1.Visible = False
            While reader.Read()
                ' NB: Overwriting the contents of a single set of controls with the
                '     data from each record; you will only display the last record.
                
                installationAddress.Text = String.Format("{0} {1}, {2} {3}", reader("InstallAddress"), reader("InstallCity"), reader("InstallState"), reader("InstallZip"))
                waterAccountNumber.Text = reader("WaterAcctNo").ToString()
                ownerInformation.Text = String.Format("{0} {1}", reader("PrimaryFirst"), reader("PrimaryLast"))
                dateReceived.Text = reader("dateReceived").ToString()
                applicantName.Text = reader("applicant").ToString()
            End While
        Else
            div1.Visible = True
        End If
    End Using
End Using




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

GeneralRe: Having problem showing just a section of a page. Pin
samflex17-Jan-23 6:21
samflex17-Jan-23 6:21 
QuestionASP.NET core web api Pin
tixzre28-Dec-22 7:15
tixzre28-Dec-22 7:15 
AnswerRe: ASP.NET core web api Pin
tixzre29-Dec-22 5:41
tixzre29-Dec-22 5:41 
GeneralRe: ASP.NET core web api Pin
Richard Deeming5-Jan-23 0:28
mveRichard Deeming5-Jan-23 0:28 
QuestionStore Rich Text in DATA Base Pin
CARBER25-Nov-22 22:05
CARBER25-Nov-22 22:05 
AnswerRe: Store Rich Text in DATA Base Pin
RedDk26-Nov-22 9:08
RedDk26-Nov-22 9:08 
GeneralRe: Store Rich Text in DATA Base Pin
CARBER26-Nov-22 11:03
CARBER26-Nov-22 11:03 
AnswerRe: Store Rich Text in DATA Base Pin
Sam Hobbs26-Nov-22 12:22
Sam Hobbs26-Nov-22 12:22 
QuestionSuggestion on searching thru jobs and resumes Pin
Michael Clinton21-Oct-22 9:44
Michael Clinton21-Oct-22 9:44 

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.