Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change HTML Code

Status
Not open for further replies.

ofsouto

Programmer
Apr 29, 2000
185
BR
Hi, dear

I have a page (aspx) with a lot of controls.
Is it possible to change the html code at run time?
How can I find an specific part of html code and change/remove/add?

Thank you very much
 
someone suggested 2 things to me:

One to organize what I want to display in groups and offer links to those groups..

also, someone said to create the textboxes/controls on the fly...and gave me this code:

Code:
<asplaceholder id="thisPlace" runat="server"/>

in code (and please keep in mind this is absolute bare bones):

Dim strSQL as String = "SELECT * FROM table" 'Uggg, better to write all the column names out
Dim objConn As System.Data.SqlClient.SqlConnection
Dim objComm As System.Data.SqlClient.SqlCommand
Dim ThisReader As System.Data.SqlClient.SqlDataReader
objConn = New System.Data.SqlClient.SqlConnection(GetConnectString())
objConn.Open()
objComm = New System.Data.SqlClient.SqlCommand("sql", objConn)
ThisReader = objComm.ExecuteReader()
If ThisReader.HasRows() Then
Dim i As Integer
For i = 0 To (ThisReader.FieldCount - 1)
Dim txtNew As New TextBox
txtNew.ID = ThisReader.GetName(i)
txtNew.Text = ThisReader.Item(i)
thisPlace.Controls.Add(txtNew)
Next
End If
ThisReader.Close()
objComm.Dispose()
objConn.Close()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top