NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page ASP.NET and ActiveX hell...

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
3 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 06-13-2005, 05:30 AM THREAD STARTER               #1 (permalink)
New Member
Join Date: Mar 2005
Posts: 4
ChrisK76 is an unknown quantity at this point
 



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!
ChrisK76 is offline  
Closed Thread


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

 
All times are GMT -7. The time now is 12:32 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger