Assign value to HTML control

Discussion in 'ASP .Net' started by Grey, May 20, 2004.

  1. Grey

    Grey Guest

    I want to assign a value to HMTL textbox with id "txtABC" in ASP.NET with C#
     
    Grey, May 20, 2004
    #1
    1. Advertisements

  2. Grey

    Guest Guest

    Hi
    Unless it is a server control it cannot be accessed at the server side. You can set the value of the textbox by making it as a runat = server control
    the bes
    srini
     
    Guest, May 20, 2004
    #2
    1. Advertisements

  3. Hi Grey,
    HMTL or HTML ?

    to assign the value to the HTML textbox you need to the add the runat="server" attribute for the html textbox

    once you have that you can access that html textox control with its id and assign the value
    myHTMLTextBox.Value = "Hello";

    HTH
    Regards
    Ashish M Bhonkiya

    I want to assign a value to HMTL textbox with id "txtABC" in ASP.NET with C#
     
    Ashish M Bhonkiya, May 20, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.