473,383 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Building Run-time Dynamic Controls

krs
I am using XML/XSL to build a dynamic asp.net control at runtime. So the
result of the XML/XSL transformation may result in a string such as:

<asp:TextBox id="TextBox1" runat="server">
</asp:TextBox>

I then use Page.parsecontrols method to create the control from the string
above.

This works fine for most situations but I now need to be able to have a
script block in the string, for example:
<asp:TextBox id="TextBox1" runat="server" Text='<%#
DataBinder.Eval(DataView1, "[0].au_lname") %>'>
</asp:TextBox>

The problem though, is that when I run the page, I get an error telling me
that the script block is not compiled.

Is there a way for me to compile this at runtime?

Many thanks
K

Oct 10 '05 #1
1 1302
krs
Just another quick detail. The concept is that I'm using xml/xsl to build the
asp.net page on the fly. Hope this makes sense, if not please post and I'll
expand on it.

Thanks
K

"krs" wrote:
I am using XML/XSL to build a dynamic asp.net control at runtime. So the
result of the XML/XSL transformation may result in a string such as:

<asp:TextBox id="TextBox1" runat="server">
</asp:TextBox>

I then use Page.parsecontrols method to create the control from the string
above.

This works fine for most situations but I now need to be able to have a
script block in the string, for example:
<asp:TextBox id="TextBox1" runat="server" Text='<%#
DataBinder.Eval(DataView1, "[0].au_lname") %>'>
</asp:TextBox>

The problem though, is that when I run the page, I get an error telling me
that the script block is not compiled.

Is there a way for me to compile this at runtime?

Many thanks
K

Oct 10 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: tony | last post by:
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries....
0
by: tony | last post by:
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries....
3
by: tony | last post by:
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries....
4
by: stpark22 | last post by:
Hello, I'm building a tracking tool using Access 2003, where my users will be entering orders that includes quantity of products sold, and cost per unit. I'm in the process of building several...
4
by: ramshankaryadav | last post by:
Hi, I'm facing a problem while building a project through MSBuild, this project is a part of a solution which has several other projects on which it depends, but I want to build this project...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.