Search code examples
activexdatetimepicker

DatTimePicker in ActiveXControl Used in WEB app works only first time ? Not working afterwards


I have VB.Net windows DateTimePicker control in my ActiveXControl . When I use this ActiveX control in my web application , my dateTime picker control works only first time when application is loaded . Afterwards it wont show the calendar at all . Also I am not able to debug the ActiveX Control from my web application .

Intersting thing is , when I use my AtciveXControl as seperate application and run , it works fine for me . But when used in WEB app , i am getting that issue . Please suggest/advice . Or is this any dll issue etc am not able to figure it out . thanks in advance .


Solution

  • I got the solution . The whole issue was because of one line - Application.EnableVisualStyles() . (System.Windows.Forms.Application.EnableVisualStyles()) Hope this helps someone when in trouble .