RE: Possible: dynamically populated and placed user control in the middle of a string?



Hi KF,

I have also found your another thread "Subject: impossible or not:
dynamically embedding a user control in the middle of a string?" describing
the issue in the microsoft.public.dotnet.framework.aspnet newsgroup and I
have posted my reply there.

As I also mentioned there, if you want to insert a usercontrol at a random
(not determined at design-time), I'm afraid the ASP.NET page/control model
doesn't quite support this. Even dynamic created control need a fixed
holder/container (placeholder) on the page. For your scenario, you may
consider dynamically embed some html element in the text string( such as
html <img> or <iframe> ) because such element does not require ASP.NET
runtime parsing and compilation and can link to other resources via a given
url.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • Raise Event not working (revised)
    ... I am trying to raise a custom event in this user control passing custom data ... protected void HandleChangedEvent(object sender, ChangedFieldsEventArgs ... public ChangedFieldsEventArgs(int row, int col, string newVal, string ...
    (microsoft.public.dotnet.languages.csharp)
  • c# Event raising problem (revised)
    ... I am trying to raise a custom event in this user control passing custom data ... protected void HandleChangedEvent(object sender, ChangedFieldsEventArgs ... public ChangedFieldsEventArgs(int row, int col, string newVal, string ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: parser error
    ... 'myApp.pcReport' is an user control. ... > at System.Web.UI.TemplateParser.ProcessDirective(String directiveName, ... > at System.Web.UI.TemplateParser.ParseString(String text, String ... > virtualPath, String basePhysicalDir) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Calculator
    ... Taking that string, you could create the code that I laid out for you. ... create a code segment and compile and run it). ... >>> I'm developing a user control with a textbox inside. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: User Control question - REPOSTED
    ... I have a user control and a web page. ... Protected Shared WithEvents txtSalesTaxPercent As ... Public Property NotesAs String ... dim tempString as string ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)

Loading