If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > HTML page using Renspone.Write

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-24-09, 05:08
sirajul sirajul is offline
Registered User
 
Join Date: May 2009
Posts: 5
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.
Reply With Quote
  #2 (permalink)  
Old 06-24-09, 07:43
sirajul sirajul is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 06-24-09, 09:37
Ax238 Ax238 is offline
Registered User
 
Join Date: May 2009
Posts: 257
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
Reply With Quote
  #4 (permalink)  
Old 06-25-09, 13:13
junction4seo junction4seo is offline
Banned
 
Join Date: Jun 2009
Posts: 7
It is not possible to change the html to dynamic page.
Reply With Quote
  #5 (permalink)  
Old 07-06-09, 12:08
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,071
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? ***
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On