Results 1 to 5 of 5
  1. #1
    Join Date
    May 2009
    Posts
    5

    Unanswered: HTML page using Renspone.Write

    Hi,
    In ASP.Net, I want to show html page dynamically by using html tags as a string using the response.write. When i did this for html tags its working. But when i created asp textbox, the page is dispalyed with no text box. I am using a style sheet to arrange the height and width of the textbox.

  2. #2
    Join Date
    May 2009
    Posts
    5
    Code:
     Response.Write("<asp:dropdownlist id=cmbStatus runat=server Width=144px Height=48px></asp:dropdownlist>")
    I want to something like above to display controls dynamically

  3. #3
    Join Date
    May 2009
    Posts
    258
    That's not really possible, by the means with which you are attempting to do it. Response.Write is processed on the server and so are the ASP.NET controls, there's no way to register text written to the page as a control by Response.Write.

    There are other options you can use for ASP.NET, such as the PlaceHolder control. If it is something that you need to show for some users and hide for others, you can use the Visible property of the textbox control, eg:
    Code:
    <asp:TextBox id="TextBox1" runat="server" Visible="False" />
    Regards,

    Ax

  4. #4
    Join Date
    Jun 2009
    Posts
    7
    It is not possible to change the html to dynamic page.

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Response.Write(""); injects html directly into the response stream as a string. ASP.NET Server controls must first be instantiated and handled server side, the controls then ultimately decide what REAL html should be injected in to the response stream. So passing a literal "<asp:TextBox .. />" down to the browser means nothing. The browser has no idea what ASP.NET is and it relies on the server to interpret "<asp:TextBox .. />" into an "<input type="text" ... />" element BEFORE the html is sent back to the browser.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •