473,490 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ExecCommand and DHTMLEDLib.DEInsertTableParamClass

dd
Cannot figure it out. If somebody can help, I'd appreciate it.
I am using DHTML Edit control from C# for editing HTML pages. I am trying to
insert a table into an HTML page and I keep getting an error. Here is the
code:
DHTMLEDLib.DEInsertTableParamClass oTableParam = new
DHTMLEDLib.DEInsertTableParamClass();
oTableParam.NumCols = 3;
oTableParam.NumRows = 3;
oTableParam.TableAttrs = "align=\"left\" border=\"1\" width=\"100%\"";
ctlEdit.ExecCommand(DHTMLEDLib.DHTMLEDITCMDID.DECM D_INSERTTABLE,
DHTMLEDLib.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref oTableParam);

The problem is that this method expects ref object as a parameter where I
use oTableParam. But oTableParam is actually DEInsertTableParamClass. This
does not compile. When I used this

object oTableParam = null; //or object oTableParam = "";
It compiles but gives an exception.

Casting an object to oTableParam does not work either.

Does anyone know how to overcome this?
Nov 15 '05 #1
1 1902
How about keeping oTableParam as is, but then:

object oOther = oTableParam;
ctlEdit.ExecCommand(
DHTMLEDLib.DHTMLEDITCMDID.DECMD_INSERTTABLE,
DHTMLEDLib.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT,
ref oOther);

--
John Saunders
Internet Engineer
jo***********@surfcontrol.com

"dd" <so*****@somewhere.com> wrote in message
news:yk*******************@news20.bellglobal.com.. .
Cannot figure it out. If somebody can help, I'd appreciate it.
I am using DHTML Edit control from C# for editing HTML pages. I am trying to insert a table into an HTML page and I keep getting an error. Here is the
code:
DHTMLEDLib.DEInsertTableParamClass oTableParam = new
DHTMLEDLib.DEInsertTableParamClass();
oTableParam.NumCols = 3;
oTableParam.NumRows = 3;
oTableParam.TableAttrs = "align=\"left\" border=\"1\" width=\"100%\"";
ctlEdit.ExecCommand(DHTMLEDLib.DHTMLEDITCMDID.DECM D_INSERTTABLE,
DHTMLEDLib.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref oTableParam);

The problem is that this method expects ref object as a parameter where I
use oTableParam. But oTableParam is actually DEInsertTableParamClass. This
does not compile. When I used this

object oTableParam = null; //or object oTableParam = "";
It compiles but gives an exception.

Casting an object to oTableParam does not work either.

Does anyone know how to overcome this?

Nov 15 '05 #2

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

Similar topics

1
2544
by: dd | last post by:
Cannot figure it out. If somebody can help, I'd appreciate it. I am using DHTML Edit control from C# for editing HTML pages. I am trying to insert a table into an HTML page and I keep getting an...
2
8804
by: jez | last post by:
Hello, When inserting an image into an article for publication on the web, the execCommand method can be used. The code looks like this: execCommand('InsertImage','','image source'). The...
1
6716
by: E J | last post by:
Does anyone know of a way to wrap custom tags around selected text using execCommand or otherwise? I am developing a rich text editor for use in a web site and while there are a few decent ones...
3
4476
by: Patrick S | last post by:
I am using IE 6.0. On a page, I have placed a contenteditable div which I want to use as a Rich Text Area. I am using the execCommand method of the document to control bold, italics,...
2
13354
by: Rafal Konopka | last post by:
I've read MS documentation, I've searched the discussion threads, I cannot invoke the SaveAs command from a web page. I tried <a href="javascript:window.execCommand(\"SaveAs\");"><click here</a>...
4
7131
by: am75 | last post by:
Hi everybody, I'm developing web pages for content management using iframes, through which users can edit html portions... I found execCommand to apply simple formats (bold, italic...) to text....
0
1488
by: SAL | last post by:
Below is my javaScript function that I am having trouble with. When I set the bUserInterface parameter to FALSE in the follow statement, "document.execCommand("CreateLink","false", oSource)", the...
23
7652
by: abdalimohd | last post by:
hi all, i m developing an html editor for my web page since i cannot trace out the enter key press for the available html editors for asp.net app. now i have done everything that i need with this...
6
22938
by: mrobinson86 | last post by:
Hey guys, wondered if anybody could help me out with a pretty simple piece of code that has been driving me crazy for the past few days? I am trying to create a client side self sustaining message...
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7146
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
7183
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...
1
6852
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...
1
4878
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...
0
4573
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
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 ...
0
277
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...

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.