Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

how to generate dynamic server controls (textbx,butns).

Hi,
I want to know how to dynamically generate the server controls (eg., <asp:button> or <asp:textbox> inside a panel (<div>) .

Furthermore, I have a problem with using crystal reports as reporting tool. The case is when I develop the reports, my SqlServer is named as default, but when I deploy the application in another m/c, cause it has a different server name "MySERVER", I get an error whenever I try to view the report from my running application. the error is, "Login failed", cryatalreportsengine error. Please suggest something so I can get the connection work properly.

poulomi
[628 byte] By [poulomi] at [2007-11-11 8:50:30]
# 1 Re: how to generate dynamic server controls (textbx,butns).
' Create a new textbox
Dim txtBox As New TextBox
' Set textbox properties as desired
With txtBox
.ID = "MyTextBox"
.Width = Unit.Percentage(100)
' etc.
End With
' Insert into panel
MyPanel.Controls.Add(txtBox)

Please post your Crystal Reports question as a separate thread. You're more likely to receive an answer if you post one question per thread. Thanks!
Phil Weber at 2007-11-11 23:12:57 >