textbox asp.net - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

textbox asp.net

honey philiphoney philip Posts: 3Member
i want to add new data
there are 3 textboxes
textbox1 - productname
textbox2-productid
the problem is that there are 3 productnames this i want to enter through the textbox
in the product name if i enter aaa
product id must display aaa01
after clicking the submit button if i enter aaa once more
product id must display aaa02 like that upto aaa09
pls help
i use asp.net,vb.net sqlserver(Stored procedures)

Comments

  • linprishublinprishub Posts: 61Member
    : i want to add new data
    : there are 3 textboxes
    : textbox1 - productname
    : textbox2-productid
    : the problem is that there are 3 productnames this i want to enter through the textbox
    : in the product name if i enter aaa
    : product id must display aaa01
    : after clicking the submit button if i enter aaa once more
    : product id must display aaa02 like that upto aaa09
    : pls help
    : i use asp.net,vb.net sqlserver(Stored procedures)
    :
    :
    save the record when u submit and get the incremented value
    when you are retreving the record select convert(substring(productid,4,5) + 1 from table1


  • ilaveniilaveni Posts: 3Member
    : i want to add new data
    : there are 3 textboxes
    : textbox1 - productname
    : textbox2-productid
    : the problem is that there are 3 productnames this i want to enter through the textbox
    : in the product name if i enter aaa
    : product id must display aaa01
    : after clicking the submit button if i enter aaa once more
    : product id must display aaa02 like that upto aaa09
    : pls help
    : i use asp.net,vb.net sqlserver(Stored procedures)
    :
    :
  • ilaveniilaveni Posts: 3Member
    : : i want to add new data
    : : there are 3 textboxes
    : : textbox1 - productname
    : : textbox2-productid
    : : the problem is that there are 3 productnames this i want to enter through the textbox
    : : in the product name if i enter aaa
    : : product id must display aaa01
    : : after clicking the submit button if i enter aaa once more
    : : product id must display aaa02 like that upto aaa09
    : : pls help
    : : i use asp.net,vb.net sqlserver(Stored procedures)
    : :
    : :
    :

  • ilaveniilaveni Posts: 3Member
    : i want to add new data
    : there are 3 textboxes
    : textbox1 - productname
    : textbox2-productid
    : the problem is that there are 3 productnames this i want to enter through the textbox
    : in the product name if i enter aaa
    : product id must display aaa01
    : after clicking the submit button if i enter aaa once more
    : product id must display aaa02 like that upto aaa09
    : pls help
    : i use asp.net,vb.net sqlserver(Stored procedures)
    :
    :

  • linprishublinprishub Posts: 61Member
    : : i want to add new data
    : : there are 3 textboxes
    : : textbox1 - productname
    : : textbox2-productid
    : : the problem is that there are 3 productnames this i want to enter through the textbox
    : : in the product name if i enter aaa
    : : product id must display aaa01
    : : after clicking the submit button if i enter aaa once more
    : : product id must display aaa02 like that upto aaa09
    : : pls help
    : : i use asp.net,vb.net sqlserver(Stored procedures)
    : :
    : :
    :
    :
    hi,
    i don't know where exactly u are facing the problem as far i understand ,
    in asp.net on the item validation that means you can write code on the Product name once the user enters aaa and leaves the item you can fire validation to effect on product id , u have to set the properties of the product name of AutoPostBack to true and you can write a code on the .vb file
    ......e.g
    Protected WithEvents txtAboutus As System.Web.UI.WebControls.ProductName
    Protected WithEvents txtAboutus As System.Web.UI.WebControls.ProductID

    'create the text box productname and productid as the above

    Private Sub Productname_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Productname.TextChanged
    'val will be the incremented value you can write code for that

    productid.text = productname.text & '0' & val
    End Sub

    let me know if you still have problem ok
    hope this solves u r problem

    regards
    linus


Sign In or Register to comment.