| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| New Member Join Date: Mar 2005
Posts: 4
![]() | ASP.NET and ActiveX hell... Hi everyone! The wize people of this forum have helped me in the past, and I'm hoping you are able to do so again..... I have developed a website which my school uses for writing reports. Currently, the text of the report is written into a standard ASP.NET textBox, and then submitted back to the server. I have just got an ActiveX control which I can replace the textBox with, as it also acts as a spell checker. The problem is this: The report page is basically a form, and it is dynamically generated depending upon the subject, year etc... The site is all programmed in ASP.NET/C#, and the basic sequence of events is this: the form.aspx file contains an asp:panel element <asp:panel id="panel1"></asp:panel>... and then depending upon the fields required, a series of labels and textBoxes are added using panel1.Controls.Add(textBox, label etc...); This works great, but how do I add an activeX object? I tried just initialising one in my code... AxControl a=new AxControl(); ... but this crashes (presumably because it then tries to run on the server, rather than in the web browser). Because the position and size of the control are not constant, I can't just drag-n-drop it using the designer, and as I am trying to be cautious and thus use a textBox for any browser except IE, i want to drop in the correct field... I have also tried building up a string such as "<object classid='xxx' etc>" for the activeX object, and using Response.Write(string) to add the box, and while this makes it appear on the page, it sticks the code right at the start of the page above the <HTML> tag, and therefore outside of my <form></form> tags, so the data doesn't get sent back... Is there an easy way to do this? Or should I just code some JavaScript to copy the code into a hidden field in the form when i hit the 'save' button? Phew....... Thanks!
Last edited by ChrisK76; 06-13-2005 at 05:32 AM.
Reason: smilies appearing!
|
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 ActiveX .com's | stigmata41 | Domain Appraisals | 4 | 06-12-2005 07:33 PM |
| ActiveX forms | drdark | Programming | 0 | 06-30-2004 11:36 AM |