473,569 Members | 2,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page.ParseContr ol and Eval

Hi All,

I am using ParseControl to load a formview contol from a string, some of the
child controls are bound using Eval but these fail as Eval seems to have
already been called within the parse leaving the databind expression blank
causing an error to be raised on bind.

If i use Bind instead of Eval i get the page back bound properly but of
course i cant update the readonly fields so it fails on update.

I have been searching for several hours now and have found some articles
that show the same prob but no workarounds other than using loadcontrol
which does work but you have to use a static ascx.

can any one help please.

Regards Alan Smith
Jan 18 '07 #1
1 1761

"AlanJSmith " <Aa**********@R EMOVEALLCAPSNno rthgate-is.Ccomwrote in message
news:OC******** *****@TK2MSFTNG P04.phx.gbl...
Hi All,

I am using ParseControl to load a formview contol from a string, some of
the child controls are bound using Eval but these fail as Eval seems to
have already been called within the parse leaving the databind expression
blank causing an error to be raised on bind.

If i use Bind instead of Eval i get the page back bound properly but of
course i cant update the readonly fields so it fails on update.

I have been searching for several hours now and have found some articles
that show the same prob but no workarounds other than using loadcontrol
which does work but you have to use a static ascx.

can any one help please.

Regards Alan Smith
Alan,

I have the same problem as you. Have you managed to resolve this or have you
found any further workarounds?

Kind regards,

Chris
Mar 13 '07 #2

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

Similar topics

0
3025
by: Matthias Lohrer | last post by:
Hi, I want to add dynamically controls to my aspx-Page by using the Page.parseControl-method. Page_Load contains this code: str = "<asp:TextBox runat='server' id='txtEingabe' TextMode='SingleLine' /><asp:RequiredFieldValidator id='req' runat='server' ControlToValidate='txtEingabe'>Bitte um eine
1
3390
by: Matthias Lohrer | last post by:
Hi, I'm playing around with the possibilities of Page.ParseControl. I parse a string with an input-field and an RequiredFieldValidator-control. For testing the server-side validation I disable JavaScript and get this scenario: - When you enter a name, no warning appears, that's good! - When you don't enter a name, the warning appears,...
1
1917
by: Jeremy McPeak | last post by:
Good morning. I am having a problem with the TemplateControl.ParseControl() method. It does parse the string into a control; however, added attributes are left out of the parsing and make it to the final HTML code. For example: ParseControl("<asp:button OnClick="Btn_Click" text='Click here!' runat='server' />"); Becomes this HTML:
2
1483
by: Chris Simeone | last post by:
When I use ParseControl in a C# code behind to create a button... Control c3 = ParseControl("<asp:button id='Button3' text='Btn3' oncommand='OnButton' commandname='Btn' commandargument='b3' runat='server' />"); The HTML that's rendered looks like this... <input type="submit" name="Button3" value="Btn3" id="Button3" oncommand="OnButton"...
1
1366
by: DotNetWorks | last post by:
Does anyone know of a way to insert a directeve from the code behind? Background: I an creating a custom web control that wraps the IE Web control tab strip. The tab strip will still use the IE web control tab items but the tab strip container will be custom. So I will
4
1760
by: Adrijan Josic | last post by:
I have this idea, I need to know if it is possible and how. Let's say you have a content managed site with all its structure and content - everything in a relational database And a "blank" page that loads content from the database. This one single page would have to know what content is requested. Obviously this could be done by pageIDs in...
6
4854
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still...
3
3274
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a "Searching..." page then, refreshes and displays the table I want. I have code that grabs data from the page using cURL but when I look at the data it contains...
1
1814
by: Jordan S. | last post by:
Using .NET 3.5, I'm wondering how to get a control's specific type (e.g,. "Button" and not simply "Control") after the control is inserted into a control hierarchy - when ParseControl is used. For example, I have the following code: string str = "<table border=1><tr><td>Hello World</td></tr><tr><td><asp:Button ID=\"TestButton\"...
0
7698
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.