472,982 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to insert HTML strings in ASP.net

Hi, friends,

In ASP, we use
obj = CreateObject("com.dll")
obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2)
to get different HTML strings based on input values.

Then, we insert them into proper location of HTML something like the
following:
<table>
<% = outHTMLTxt1 %>
</table>

In ASP.net, how do we do this? I looked into Page_Load() event, and I could
get different HTML strings, but I did not know how to insert them into proper
location of HTML.

Any sample source code or reference papers? Help please.

Thanks a lot
Nov 19 '05 #1
5 4038
you can either use a control, which is what I recommend, or you can still do
inline coding with asp.net.. the <% %> is still usable.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Andrew" wrote:
Hi, friends,

In ASP, we use
obj = CreateObject("com.dll")
obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2)
to get different HTML strings based on input values.

Then, we insert them into proper location of HTML something like the
following:
<table>
<% = outHTMLTxt1 %>
</table>

In ASP.net, how do we do this? I looked into Page_Load() event, and I could
get different HTML strings, but I did not know how to insert them into proper
location of HTML.

Any sample source code or reference papers? Help please.

Thanks a lot

Nov 19 '05 #2
But, I do not have object, such as com.dll, any more. I created different
HTML strings in Page_load(). How can I instert it in HTML? Any sample code?

"Curt_C [MVP]" wrote:
you can either use a control, which is what I recommend, or you can still do
inline coding with asp.net.. the <% %> is still usable.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Andrew" wrote:
Hi, friends,

In ASP, we use
obj = CreateObject("com.dll")
obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2)
to get different HTML strings based on input values.

Then, we insert them into proper location of HTML something like the
following:
<table>
<% = outHTMLTxt1 %>
</table>

In ASP.net, how do we do this? I looked into Page_Load() event, and I could
get different HTML strings, but I did not know how to insert them into proper
location of HTML.

Any sample source code or reference papers? Help please.

Thanks a lot

Nov 19 '05 #3
Huh?
What specifically is your question? Is it how to get a string/text/html from
code onto the page, or how to get the string/text/html out of a DLL you wrote?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Andrew" wrote:
But, I do not have object, such as com.dll, any more. I created different
HTML strings in Page_load(). How can I instert it in HTML? Any sample code?

"Curt_C [MVP]" wrote:
you can either use a control, which is what I recommend, or you can still do
inline coding with asp.net.. the <% %> is still usable.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Andrew" wrote:
Hi, friends,

In ASP, we use
obj = CreateObject("com.dll")
obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2)
to get different HTML strings based on input values.

Then, we insert them into proper location of HTML something like the
following:
<table>
<% = outHTMLTxt1 %>
</table>

In ASP.net, how do we do this? I looked into Page_Load() event, and I could
get different HTML strings, but I did not know how to insert them into proper
location of HTML.

Any sample source code or reference papers? Help please.

Thanks a lot

Nov 19 '05 #4
For exmple, in Page_Load()

newHTMLStr = "<tr><td>....";

If I use Reponse.Write(newHTMLStr), all those <tr><td> element will be on
the top of web page. But, I want to inert those <tr><td> elements into
<table></table>. This <table></table> element was already created when I
designed the web page by draging and droping it in a web form.

My question is: How to insert this new created newHTMLStr into pre-existing
<table></table> element so that we have cells in the previouly empty
<table></table> element.
"Curt_C [MVP]" wrote:
Huh?
What specifically is your question? Is it how to get a string/text/html from
code onto the page, or how to get the string/text/html out of a DLL you wrote?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Andrew" wrote:
But, I do not have object, such as com.dll, any more. I created different
HTML strings in Page_load(). How can I instert it in HTML? Any sample code?

"Curt_C [MVP]" wrote:
you can either use a control, which is what I recommend, or you can still do
inline coding with asp.net.. the <% %> is still usable.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Andrew" wrote:

> Hi, friends,
>
> In ASP, we use
> obj = CreateObject("com.dll")
> obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2)
> to get different HTML strings based on input values.
>
> Then, we insert them into proper location of HTML something like the
> following:
> <table>
> <% = outHTMLTxt1 %>
> </table>
>
> In ASP.net, how do we do this? I looked into Page_Load() event, and I could
> get different HTML strings, but I did not know how to insert them into proper
> location of HTML.
>
> Any sample source code or reference papers? Help please.
>
> Thanks a lot

Nov 19 '05 #5
Check out the Literal control

Basically you would declare a Literal control in your HTML table - where you
want the inserted HTML to go. Then, in your code behind, you'd set the .Text
property of the Literal control to your HTML string. It's that simple.

If you want your HTML to be styled, then you'd have to use inline CSS or set
the css class property directly in the HTML string you are inserting.

http://www.w3schools.com/aspnet/control_literal.asp

http://msdn.microsoft.com/library/de...classtopic.asp
-HTH
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
For exmple, in Page_Load()

newHTMLStr = "<tr><td>....";

If I use Reponse.Write(newHTMLStr), all those <tr><td> element will be on
the top of web page. But, I want to inert those <tr><td> elements into
<table></table>. This <table></table> element was already created when I
designed the web page by draging and droping it in a web form.

My question is: How to insert this new created newHTMLStr into
pre-existing
<table></table> element so that we have cells in the previouly empty
<table></table> element.
"Curt_C [MVP]" wrote:
Huh?
What specifically is your question? Is it how to get a string/text/html
from
code onto the page, or how to get the string/text/html out of a DLL you
wrote?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Andrew" wrote:
> But, I do not have object, such as com.dll, any more. I created
> different
> HTML strings in Page_load(). How can I instert it in HTML? Any sample
> code?
>
> "Curt_C [MVP]" wrote:
>
> > you can either use a control, which is what I recommend, or you can
> > still do
> > inline coding with asp.net.. the <% %> is still usable.
> >
> > --
> > Curt Christianson
> > site: http://www.darkfalz.com
> > blog: http://blog.darkfalz.com
> >
> >
> >
> > "Andrew" wrote:
> >
> > > Hi, friends,
> > >
> > > In ASP, we use
> > > obj = CreateObject("com.dll")
> > > obj.GetHTMLText(inVal, outHTMLTxt1, outHTMLTxt2)
> > > to get different HTML strings based on input values.
> > >
> > > Then, we insert them into proper location of HTML something like
> > > the
> > > following:
> > > <table>
> > > <% = outHTMLTxt1 %>
> > > </table>
> > >
> > > In ASP.net, how do we do this? I looked into Page_Load() event, and
> > > I could
> > > get different HTML strings, but I did not know how to insert them
> > > into proper
> > > location of HTML.
> > >
> > > Any sample source code or reference papers? Help please.
> > >
> > > Thanks a lot

Nov 19 '05 #6

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

Similar topics

1
by: jason | last post by:
If one is attempting to insert data into tables at the same time what is the best way to do this. I could do it the way below - but is there any reason I should not do it this way or perhaps follow...
3
by: shank | last post by:
Can anyone see anything wrong with this INSERT code? It doesn't INSERT and I get the following error when I try to submit data... Microsoft OLE DB Provider for ODBC Drivers error '80040e14' The...
4
by: Lauren Quantrell | last post by:
I have created the following trigger: CREATE TRIGGER ON OutputTable FOR INSERT AS Declare @filename nvarchar(35) Declare @filecontents nvarchar(2000) Declare @strcmdshell varchar(150)
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
4
by: chambersdon | last post by:
I have an application that needs to insert nulls into the database and I don't seem to be able to do this. I am currently trying to do this with a Typed DataSet but I can't seem to Insert Nulls...
4
by: Water Cooler v2 | last post by:
Besides embedding <BR/>, like general purpose programming languages, I thought you could embed escape sequences such as \n or \r\n into string arguments to cause line breaks in JavaScript. To...
8
by: SaltyBoat | last post by:
Needing to import and parse data from a large PDF file into an Access 2002 table: I start by converted the PDF file to a html file. Then I read this html text file, line by line, into a table...
2
by: parasuram | last post by:
Hi friends ............. this is a question regarding the data structures trees Pleas post it if possible with in 2 days I will thankful if some body could help doing this. Operating...
6
by: sgulciny | last post by:
hi friends; I have problem about sql server insert and update in client side. I am coding windows application with c#.When I run my code in database server computer all is fine.I can see data,...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.