DHTML Edit Control, Inserting table

D

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.DECMD_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?
 
G

Guest

It's been a million years since you posted your message, but just assign your oTableParam to a new object and your problem will be solved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top