Given a web form with a Rad Editor, I would like to be able to have this form create a new web page with the given text entered into the editor? I am not quite sure how to begin. The page will also have a ddl which the user can select which part of the menu the page will be sent to? Is there a way to do this or should I consider a new option?
Dynamically Creating Web Pages
Collapse
X
-
You can write the HTML code on every key press or Change event in the 'rad' editor. (RAD = Rapid Application Development?)Originally posted by roharaGiven a web form with a Rad Editor, I would like to be able to have this form create a new web page with the given text entered into the editor? I am not quite sure how to begin. The page will also have a ddl which the user can select which part of the menu the page will be sent to? Is there a way to do this or should I consider a new option?
What do you mean by DDL? Thats usually Data Definition Language among others. Or do you mean dynamic creation of HTML code? -
DDL = Drop Down List. This will be a asp.net web form which will have a Drop Down List which will list groups of pages for which you could save the page under. The only real thing that I need to know how to do is create a new web form from code behind or in the html source so that when you click a button it will create a web form with the text being what is typed in the Rad Editor. And the Rad Editor is a control which is developed by Telerik, but you can think of it as a complex text box.Comment
-
My approach would be to maintain an HTML string variable. Something with the starting HTML tag "<HTML>"Originally posted by roharaDDL = Drop Down List. This will be a asp.net web form which will have a Drop Down List which will list groups of pages for which you could save the page under. The only real thing that I need to know how to do is create a new web form from code behind or in the html source so that when you click a button it will create a web form with the text being what is typed in the Rad Editor. And the Rad Editor is a control which is developed by Telerik, but you can think of it as a complex text box.
As the user types in the RAD, you could update the variable. You'd need to figure out how the RAD handles the events. In a regular textbox, there is a CHANGE event which fires when text changes. Also, there are keypress event, as well as Keyup, Keydown. So the choice is yours.Code:Public strHTML As String = "<HTML>"
When they click the button to create the page, you would use StreamWriter object to output the HTML and save with an .HTML file extension.Code:Private Sub RAD_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RAD.TextChanged strHTML = "<HTML>" & RAD.Text End Sub
As for webforms, that is ASP.net technology and I would be guessing. Best bet: post this to ASP.net to see if there is a better suggestion.Code:Dim streamHTML As StreamWriter = New StreamWriter("MyHTML.HTML") streamHTML.Write strHTML & "</HTML>"Last edited by VBWheaties; Feb 25 '08, 07:20 PM. Reason: added Code examples, changed Textwriter to StreamwriterComment
Comment