Replica178
asked on
VB.NET and Web Forms
Hi All.
I Have one problem
On web form,i have one link thats open when you click.
When its open,You have a text Area.
I must to insert text from my richtextbox into that textarea.
The code of that textArea is:
I HAVE VB.NET
Thank You
Sorry For My English,I'm Russian
I Have one problem
On web form,i have one link thats open when you click.
When its open,You have a text Area.
I must to insert text from my richtextbox into that textarea.
The code of that textArea is:
<body id="tinymce" class="mceContentBody " spellcheck="false" dir="ltr"><p><br mce_bogus="1"></p></body>
I tried to use this code:Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Try
WebBrowser1.Document.GetElementById("tinymce").InnerText = RichTextBox1.Text
Catch ex As Exception
End Try
But it doesnt Work.I HAVE VB.NET
Thank You
Sorry For My English,I'm Russian
ASKER
Doesn't work
I think you are using tinymce which not A text area as you mentioned ,
Can you please attach ( or post a link to the URL ) that has the tinymce
Can you please attach ( or post a link to the URL ) that has the tinymce
try those please
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Try
WebBrowser1.Document.All.I tem("tinym ce").outer html = RichTextBox1.Text
Catch ex As Exception
End Try
And this one too
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Try
WebBrowser1.Document.All.I tem("tinym ce").inner html = RichTextBox1.Text
Catch ex As Exception
End Try
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Try
WebBrowser1.Document.All.I
Catch ex As Exception
End Try
And this one too
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Try
WebBrowser1.Document.All.I
Catch ex As Exception
End Try
ASKER
Doesn't Work (
this should work :)
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Try
Call WebBrowser1.Document.parentWindow.execScript("tinyMCE.activeEditor.setContent(RichTextBox1.Text);", "JavaScript")
Catch ex As Exception
End Try
ASKER
This is for VB 6.0,but i have VB.NET
Well , I still use VB6 so I think the problem is the CALL
so I suggest u replace CALL with t=
Make sure T is declared
Like this
so I suggest u replace CALL with t=
Make sure T is declared
Like this
t= WebBrowser1.Document.parentWindow.execScript("tinyMCE.activeEditor.setContent(RichTextBox1.Text);", "JavaScript")
ASKER
the problem is parentWindow
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
error 80020101
Well , I have to install VB.net to check on that , will get back to u tomorrow then
ASKER
ok.thank you
Are you trying to show text in a control that is a different page?
ASKER
yes.I tried.Its not differrent
>yes.I tried.Its not differrent
Now "yes" means that its separate pages but then you contradict yourself by saying "its not different".
If you want to copy text to a text area on a page from a richtextbox on a different page, you may have to use session (query string is an option but I am assuming that text would be long so its not suitable).
Now "yes" means that its separate pages but then you contradict yourself by saying "its not different".
If you want to copy text to a text area on a page from a richtextbox on a different page, you may have to use session (query string is an option but I am assuming that text would be long so its not suitable).
ASKER
i tried this
WebBrowser1.Document.Window.DomWindow.execscript("tinyMCE.activeEditor.setContent('<span>Richtextbox1.Text</span>')", "JavaScript")
Its Perfectly Work,But it Write Richtextbox1.Text,but i need the Richtextbox1.Text value
>But it Write Richtextbox1.Text,but i need the Richtextbox1.Text value
It writes Richtextbox1.Text but you want the Richtextbox1.Text??? Your English is not that weak is it?
It writes Richtextbox1.Text but you want the Richtextbox1.Text??? Your English is not that weak is it?
ASKER
I'M RUSSIAN!
In textArea it WRITE "RICHTEXTBOX1.TEXT" - IT's A TEXT
I NEED TO WRITE THE RICHTEXTBOX1.TEXT VALUE!!!!!!!
In textArea it WRITE "RICHTEXTBOX1.TEXT" - IT's A TEXT
I NEED TO WRITE THE RICHTEXTBOX1.TEXT VALUE!!!!!!!
As I said, if the richtextbox and the textarea are on two separate pages, try using the session.
Or are both controls on same page?
Or are both controls on same page?
ASKER
WebBrowser1.Document.Window.DomWindow.execscript("tinyMCE.activeEditor.setContent('<span>" + RichTextBox1.Text + "</span>')", "JavaScript")
IT's WORK .honestman31 THANK YOU!
ASKER
THANK YOU
Open in new window