Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5844915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:21:39+00:00 2026-05-22T12:21:39+00:00

Public Function CheckIfItemPresent(ByVal userID As String, ByVal itemID As String, ByVal itemPrice As Integer,

  • 0
Public Function CheckIfItemPresent(ByVal userID As String, ByVal itemID As String, ByVal itemPrice As Integer, ByVal offer As String) As Boolean
        On Error GoTo galti

        Dim sqlStatement As String = "SELECT itemQtty FROM shoppingCart WHERE userID = '" & _
                                    userID & "' AND itemID = '" & itemID & "'" & _
                                    " AND itemPrice = " & itemPrice & " AND offer = '" & offer & "'"
        Dim con As New SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;" & _
                                               "AttachDbFilename=|DataDirectory|\database.mdf;" & _
                                               "Integrated Security=True;User Instance=True")
        Dim sql As New SqlClient.SqlCommand(sqlStatement, con)
        Dim reader As SqlClient.SqlDataReader

        con.Open()
        reader = sql.ExecuteReader
        reader.Read()
        Dim itemQtty As Integer = reader.Item("itemQtty")
        reader.Close()
        If itemQtty > 0 Then
            If ***MsgBox("Item already present. Add another one? Currently, number of this item in cart: " & itemQtty, MsgBoxStyle.YesNo, "") = MsgBoxResult.Yes*** Then
                itemQtty = itemQtty + 1
                sql.CommandText = "UPDATE shoppingCart SET itemQtty = " & itemQtty & " WHERE " & _
                                    "userID = '" & userID & "' AND itemID = '" & itemID & "' AND itemPrice=" & _
                                    itemPrice & " AND offer = '" & offer & "'"
                sql.ExecuteNonQuery()
            Else
            End If
        End If
        con.Close()
        con.Dispose()
        Return True
        Exit Function
galti:
        con.Close()
        con.Dispose()
        Return False
    End Function

how to use javascript conformation box instead of asp.net msgbox…please check the portion in between *

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:21:39+00:00Added an answer on May 22, 2026 at 12:21 pm

    There is no drop-in replacement to do that with Javascript.

    To interact with the user you have to send a response back to the browser that it can display, then the user can make the choise and send another request to the server containing the information about the choise.

    So, you have to divide this into two separate steps on the server side.

    To make a confirmation box in Javascript you can use the confirm method. Example:

    var choise = window.confirm('Item already present. Add another one? Currently, number of this item in cart: 42');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my code: Public Function selectReturnsByUserId( limit As Integer, userid As String ) As
My codes: Public Function HandleImageUpload(ByVal serverPath As String, ByVal iWidth As Integer, ByVal iHeight
Public Function MethodOne(ByVal s As String) As String Dim sb As New StringBuilder() sb.Append(s)
Public Function TitleCase(ByVal strIn As String) Dim result As String = Dim culture As
Public Function Cricket() As List(Of String) Dim list2 As New List(Of String)() With {
i have this controller function: Public Function Index(ByVal id As System.Nullable(Of Integer)) As ActionResult
Public Function Foo() as String() Dim bar As String = {bar1,bar2,bar3} Return bar End
given this function: Public Function Search(ByVal StartIndex As Integer, _ ByVal MaxResults As Integer,
Here is my function: Public Function ListPublishedArticles(ByVal startingDate As DateTime) As List(Of Article) Dim
Here is my code snippet: Public Function convert(ByVal robert As String) Try robert =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.