gi11ies
Programmer
- Mar 26, 2002
- 52
Im creating a simple forum just now that runs of an access datbase, I have the bare bones of the whole thing functioning, though Im wondering how I use the Replace command to post html into the datagrid.
For example if a user enters a web address - ie ... I insert it into the database as part of the text for a posting as [link]www.website.com[/url]
ie
blah blah blah blah [link]www.website.com[/url] blah blah blah blah blab blah blah.
I already use the Replace command within the datagrid to insert '<br>' when I display the code on the page with.
<asp:label text='<%#Replace(Databinder.Eval(Container.DataItem,"thread_text").tostring(), VbCrLf, "<br />")%>' ID="lblText" runat="server"/>
Im wondering how do I, or if I can add additional parameters to the replace command Replace command for converting my [link]www.website.com[/url] to < a href='
Im also wondering how I do the same for images - ie give url address for an image
Hope Im making sense? Can I not do this with a datagrid, and have to use DataList instead or something else?
Any help would be great.
Gillies
For example if a user enters a web address - ie ... I insert it into the database as part of the text for a posting as [link]www.website.com[/url]
ie
blah blah blah blah [link]www.website.com[/url] blah blah blah blah blab blah blah.
I already use the Replace command within the datagrid to insert '<br>' when I display the code on the page with.
<asp:label text='<%#Replace(Databinder.Eval(Container.DataItem,"thread_text").tostring(), VbCrLf, "<br />")%>' ID="lblText" runat="server"/>
Im wondering how do I, or if I can add additional parameters to the replace command Replace command for converting my [link]www.website.com[/url] to < a href='
Im also wondering how I do the same for images - ie give url address for an image
Hope Im making sense? Can I not do this with a datagrid, and have to use DataList instead or something else?
Any help would be great.
Gillies