473,513 Members | 3,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

emit raw html


I have HTML markup in a database table, e.g.
<h1>text text</h1>

When I read the data into a DataGrid, GridView or some such,
I want the HTML to be emitted as is. This means that if I view
the source of the page, I will see, e.g.
....<td><h1>text text</h1></td>...
I don't what the HTML to be encoded like
....<td><h1>text text...

Can this be done?

Thank you.

Mar 27 '06 #1
2 1791
If the HTML from the database is getting Rendered when displayed inside a
Datagrid (etc) cell, you can surround the HTML Snippet with <XMP> ... </XMP>

tags. That's the "Example" tag which is designed to tell the browser to pass
the markup through without attempting to render it.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"bill tie" wrote:

I have HTML markup in a database table, e.g.
<h1>text text</h1>

When I read the data into a DataGrid, GridView or some such,
I want the HTML to be emitted as is. This means that if I view
the source of the page, I will see, e.g.
...<td><h1>text text</h1></td>...
I don't what the HTML to be encoded like
...<td><h1>text text...

Can this be done?

Thank you.

Mar 27 '06 #2
Hi,
Not exactly on topic, but I am trying to get the answer ASAP. In your
example on http://www.eggheadcafe.com/articles/20021205.asp about
displaying windows forms in explorer I tried to repeat your steps
(along with reading and following about 10 other different sites on how
to display controls in IE), but i keep getting standard IE error page
where control should be (example on that page is the same way) with a
small red cross in an upper-left corner. I reset all permissions and
securities all over the place to full trust, tried it on two machines
(XP and Server 2003), used various samples and wrote my own code,
created several virtual folders - all to no avail. I am completly new
to hosting windows controls in IE (but by now I read pretty much all
there is publicly available online on the topic), so the solution could
be rather simple, but it manages to ellude me - this is a time
sensitive issue for me so any help would be greatly appreciated.

Steve

Mar 27 '06 #3

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

Similar topics

0
2162
by: Nigel Sampson | last post by:
ey all, I'm in the process of creating a method of tracking whenever an objects properties are changed. Since its not possible to alter existing types I decided to used a proxy generated using Reflection.Emit which inherits from the object needed Person p = (Person)ProxyBuilder.Construct(typeof(Person));
2
5175
by: DEK | last post by:
I'm creating a dynamic assembly which has one type with one constructor, the type inherits a base class Season, which is in the current assembly. I am trying to emit a constructor which simply calls the base constructor with the 4 args passed in, but I get this error Message at the second last line of the method CreateSeason (Marked with...
7
9934
by: Mark Miller | last post by:
I am using Reflection.Emit to dynamically build a class. A method of the class to be built requires a Parameter of type "Type". But I don't know how to use Emit to pass a call of "typeof()" to the method. The method could look like this: public void myDynamicMethod(Type type){ //.....do something with the Type passed in....... }
3
2502
by: John Arthur | last post by:
Hi, I am reading about Reflection.Emit and I can't really imagine a real situation where I can use this. Can someone give me an example that can't be done without Reflection or an example of something that If done with Reflection.Emit will be a lot faster or something sensible. I will really appreciate your help. Thanks : John Arthur
8
2531
by: Eyeawanda Pondicherry | last post by:
I have put some code together that creates an enum dynamically from some database values. The enum can be read perfectly by an application that references the dynamically generated dll. If I /emit/ a new version of the assembly, and start the application again, the new values will appear for the enum. However, suppose I want the...
0
1871
by: john | last post by:
Hi,All MS Tech Gurus: I need your help!!! It is the second time I post this message, I need get some feedback ASAP, Please Help!! Thanks a lot in advance. John I have a csharp method, using emit to dynamically generate classes & method depends on the meta table in the database,here is my situation 1) In One method I generated the code...
4
3038
by: Gianluca | last post by:
This is the simplified code I'm trying to generate: ilg.DeclareLocal(typeof(int)); // define local integer Label exit = ilg.DefineLabel(); // define "exit" label ilg.Emit(OpCodes.Ldc_I4_0); // put 0 on the stack ilg.Emit(OpCodes.Stloc_0); // set the local integer to 0 ilg.Emit(OpCodes.Ldloc_0); // load the local...
2
3623
by: Luis Arvayo | last post by:
Hi, In c#, I need to dynamically create types at runtime that will consist of the following: - inherits from a given interface - will have a constructor with an int argument
39
1731
by: jacob navia | last post by:
Recently we had a discussion about the following code: void f(long *lp) { *lp = 0; } int main(void) { int i; f(&i); return i; } lcc-win doesn't emit any diagnostic in normal mode, and doesn't emit a diagnostic with the higher warning level. It emits a diagnostic only in the highest warning level:
2
4466
by: joasi | last post by:
Hi, I am working in C# with an Object / Relational Database mapping framework, where I want to generate method calls based on string representation of the call signature. I have used reflection and Method-/Field-/PropertyInfo invokation to do this, but now I want to make the calls faster by using Emit and DynamicMethods I am now trying to...
0
7397
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7563
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7125
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5102
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3252
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.