473,394 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 4061
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.