Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Generate Server Controls at Runtime

Thread Tools

Generate Server Controls at Runtime

Jeffrey Jones
Posts: n/a
Hello All,

I am trying to develop a web app that will allow a user to upload files
to a folder. I have an xml file that allows a person to add or delete a
file. Basic format follows.

I also have an XSLT file that transforms the XML into HTML Controls.
Format follows.
<xsl:template match="/">
<table cellSpacing="0" cellPadding="4" rules="groups">
<xsl:for-each select="//file">
<aspanel id="pnl{endname}" runat="server">
<td><b><xsl:value-of select="label" /></b></td>
<td><input type="file" id="browse{endname}" runat="server" /></td>
<td><asp:button id="submit{endname}" runat="server" text="Submit" /></td>
<td><asp:hyperlink id="display{endname}" runat="server">Current File: NO

So far I can create the controls at runtime and can even add a
javascript onclick event to the submit button. What I can't seem to do
is add a Server side event to the submit button. Has anyone run into
this problem? Should I just read the XML file into an XML doc and add
the controls to the page at runtime instead of using XSLT? If I choose
this method, how do I add the logic to the buttons to handle the click

Thanks for your advice.

Jeff Jones
Reply With Quote

Thread Tools

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 Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to generate a user instance of SQL Server. Only an integratedconnection can generate a user instance. Harlan Messinger ASP .Net 2 03-28-2010 06:51 PM
runtime events that generate other controls and events newbye ASP .Net 0 07-06-2006 06:27 PM
How to generate warnings when How generate a warning when int is converted to bool or vice versa? C++ 3 04-06-2006 11:24 PM
How to generate variable labels for same component within a generate loop Weng Tianxiang VHDL 5 02-16-2006 01:45 PM
Nesting server controls with a composite control don't generate postback events Stephen Miller ASP .Net Building Controls 7 08-06-2003 03:49 AM