Re: Converting html string to object
From: Wouter vanEck (wouter.vaneck_at_smart-quotes.com)
Date: 01/07/05
- Next message: vMike: "Re: Converting html string to object"
- Previous message: clintonG: "Re: .NET Passport question"
- In reply to: John Saunders: "Re: Converting html string to object"
- Next in thread: John Saunders: "Re: Converting html string to object"
- Reply: John Saunders: "Re: Converting html string to object"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 7 Jan 2005 12:03:13 -0700
Hi John,
It is not the answer I was hoping for, I am currently trying to work with
rendering the string to the page.. same result unless I am doing it wrong.
Wouter
"John Saunders" <johnwsaundersiii at hotmail.com> wrote in message
news:OtPFNhO9EHA.1524@TK2MSFTNGP09.phx.gbl...
> "Wouter vanEck" <wouter.vaneck@smart-quotes.com> wrote in message
> news:uPu7bVO9EHA.2196@TK2MSFTNGP11.phx.gbl...
> > Hi,
> >
> > I need to find a way to read a html type string from a database and add
it
> > to a placeholder control on the page and then I need to be able to
> > populate
> > the fields that were in that html string at run time.
> >
> > The html string may look like this "<table><tr><td>First
> > Name</td><td><input
> > name=_firstname runat=server id=_firstname ....></td></tr></table>"
> >
> > Is there a way to convert this string into an object which you could
> > access
> > like _firstname.text or _firstname.innerhtml, any thing to being able to
> > set
> > the value would be great.
> >
> > Is there anyone who knows about an article or has an idea how to go
about
> > doing this??
>
> You can't do this directly. If you can turn the database contents into a
> user control (.ascx file) on disk, then you can load it with LoadControl.
>
> Other than that, you'll have to parse the HTML string by yourself, using
> regular expressions or something.
>
> This appears to have been designed on the assumption that you can turn a
> string into a set of server-side controls. If this turns out not to be the
> case, and if you can't do the user control trick, then perhaps you could
> change design a bit. If the string in the database were a bit easier to
> parse for "fields", you'd have better luck with it. For instance, it could
> contain strings like %fieldName%. That's pretty easy to parse for. It's a
> lot easier to parse for than runat="server" id="_firstname".
>
> John Saunders
>
>
- Next message: vMike: "Re: Converting html string to object"
- Previous message: clintonG: "Re: .NET Passport question"
- In reply to: John Saunders: "Re: Converting html string to object"
- Next in thread: John Saunders: "Re: Converting html string to object"
- Reply: John Saunders: "Re: Converting html string to object"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|