|
-
Apr 10th, 2003, 06:43 AM
#1
Thread Starter
Addicted Member
how to register an active x control in framework as server side control.
i m making a simple Webusercontrol in C# in which i added some server side webforms control. in my form i want to Add a DT Picker control which is as an OCX ( MSCOMCTL32.OCX ) i.e. Windows Common control so i select it in Add Component and add it in Web Froms , it comes on web user control as an object which has all its attributes in HTML code . So far its good ...
but as i added this OCX from my my machine and its not a server side control , i am not able to access it in C# which only give access to server side control which r registered on server and have refference in assemblies . so i m not able to access any property of my active x i.e. DT Picker control . I want to know how i can register this OCX on framework at server side so that it can go to client as other serve side controls and i can access it in my C# code.
hope u will get wat i want to do .. if not clear please ask ..
if some one got ne clue pls tell me ..
-
Apr 10th, 2003, 12:10 PM
#2
you cant stick a windows form control into a web form control if that is what you are trying to do.
also if you are refering to registering an non .NET active x on a remote server, then you probably wont be able to do that as permission to do that is not usually accepted by the Web host.
-
Apr 11th, 2003, 12:21 AM
#3
Thread Starter
Addicted Member
well i m not trying to put windows control on webform .. i just want to use DTPicker control in my WebUser control which is in MSComctl2.Ocx . i succed in one bit ahead yesterday that i add MSComctl2.ocx in reference and i was able to declare DTPicker class object using MSComctl2 like this ...
using MSComCtl2 ;
protected MSComCtl2.DtPicker txtDateofBirth;
now i can access all property of DtPicker in my C# sharp code but On my web user control still i dont know how to fetch this control from server which i add in reffernce . Normally there is synch. btw ASP server controls and its definations in C# but i hv added my control defination in C# but not able to draw it on Webuser control . Basic problem is how to make an active-x control as server side control so that i can be fethc from server as other Server side controls like System.WebControl.UI.Textbox some thing .... I tried one more thing by adding my control through program .. i wrote ..
Panel1.Controls.Add(txtDateofBirth);
but it says ... can not convert MSComCtl2.DPicker to a System.WebControl.UI.controls .. means it will only add already define controls in tht class.
so over all i m not able to user DtPicker control in a web user contol.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|