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.DEIn sertTableParamC lass oTableParam = new
DHTMLEDLib.DEIn sertTableParamC lass();
oTableParam.Num Cols = 3;
oTableParam.Num Rows = 3;
oTableParam.Tab leAttrs = "align=\"le ft\" border=\"1\" width=\"100%\"" ;
ctlEdit.ExecCom mand(DHTMLEDLib .DHTMLEDITCMDID .DECMD_INSERTTA BLE,
DHTMLEDLib.OLEC MDEXECOPT.OLECM DEXECOPT_DODEFA ULT, ref oTableParam);
The problem is that this method expects ref object as a parameter where I
use oTableParam. But oTableParam is actually DEInsertTablePa ramClass. 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?
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.DEIn sertTableParamC lass oTableParam = new
DHTMLEDLib.DEIn sertTableParamC lass();
oTableParam.Num Cols = 3;
oTableParam.Num Rows = 3;
oTableParam.Tab leAttrs = "align=\"le ft\" border=\"1\" width=\"100%\"" ;
ctlEdit.ExecCom mand(DHTMLEDLib .DHTMLEDITCMDID .DECMD_INSERTTA BLE,
DHTMLEDLib.OLEC MDEXECOPT.OLECM DEXECOPT_DODEFA ULT, ref oTableParam);
The problem is that this method expects ref object as a parameter where I
use oTableParam. But oTableParam is actually DEInsertTablePa ramClass. 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?
Comment