|
-
Aug 17th, 2003, 08:14 PM
#1
Thread Starter
PowerPoster
Exposing a user control property to page.
OK, this question is 2 parts.
The first part is I have a user control that contains an iFrame in it. I need a way to access it through the code behind file of the user control.
The second part is, I want to take the control created above, and make a property (which is just a property of the iFrame control) available to the page that is hosting this user control.
How do I do this?
-
Aug 18th, 2003, 01:20 PM
#2
Thread Starter
PowerPoster
I really need these answered if anyone can help...
-
Aug 18th, 2003, 05:14 PM
#3
Ok here is how to access properties and methods of a usercontrol from its hosting page.
Just make a Protected WithEvents declaration of it in the codebehind. The name must be the same as declared in the html/aspx page as well as have the same type. Then you can use it in the page just as any other object.
-
Aug 19th, 2003, 12:27 PM
#4
Were you able to work out the problem?
-
Aug 19th, 2003, 12:39 PM
#5
Thread Starter
PowerPoster
No, I wasn't.
The problem is it is an iFrame. For some reason, getting it to be recognized through code is not working the same as other controls.
It is weird.
If you can find a way to recognize it, I would appreciate it, because right now I am at a loss. I am thinking it is much different than tags like span and div because it is a inline frame that has it's own document.
I would be happy with a javascript solution also that posts back the iFrame.Document.Body.innerHTML value to the code in a way I could read it.
I just am getting started on it today, so I haven't tried much so far today.
-
Aug 19th, 2003, 12:45 PM
#6
Whats the setup is the iFrame inside the Usercontrol? Can the Usercontrol access the iFrame but the hosting page cannot?
Nevermind I reread your post and got it.
Last edited by Edneeis; Aug 19th, 2003 at 12:50 PM.
-
Aug 19th, 2003, 12:51 PM
#7
Thread Starter
PowerPoster
Right now I have it in a usercontrol, but I tried it in a page directly and couldn't get it to be recognized. What I would like is for it to be in a user control, and expose the innerHTML as a property to the control for the page to be able to use. This would allow me to just drop in the control and use it in other projects.
To kind of help you see what I am doing, visit this link:
http://www.devarticles.com/art/1/90/
I want to create a reusable drop in control so to allow users to create html content that I can store in a database and display on the site.
-
Aug 21st, 2003, 02:58 AM
#8
Created custom web browser called Kiddie Surfer for children usign Visual Basic 6. It controls children's browsing of the Internet based on the parents preferences. Downloaded by more than 20,000 families world wide.
i was bored and mainly looking for something interesting to do and for some reason or another read your resume and noticed that you mis-typed the word in bold. Most employers wouldnt thing thats very impressive so i thought you should know about it.
I really should find something to do. lol
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Aug 21st, 2003, 11:18 AM
#9
Thread Starter
PowerPoster
-
Sep 30th, 2003, 01:21 AM
#10
Hey I saw this: http://msdn.microsoft.com/vbasic/def...-webmatrix.asp about new web controls and say IFrame in the list and remembered this post. So just in case this never got resolved or might be helpful in the future I thought I'd post it.
-
Sep 30th, 2003, 09:13 AM
#11
Thread Starter
PowerPoster
I resolved the problem by not using it and going with a different control.
I will look at the link, thanks...
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
|