Click here to Skip to main content
15,914,642 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody.

I have a little problem tryin to create an live page editor for an ASP.NET website. I'm searched in Google but I couldn't found anything.

The website structure is:

A MasterPage
An .aspx page
Various controls.

The content is distributed as follows:

The .aspx page have the MasterPage style. Inside of .aspx page content various controls, with a menu.
When an item menu is pressed, a control is inserted inside the .aspx page

What I want to edit the content of each control.


Some idea for modify the actual structure, or change for more reliable structure?

Thanks
Posted

1 solution

Without knowing more about the project or controls involved, it sounds fine to me.

There are two or three ways I can think of you adding controls in.

The easiest way to program in 'adding controls' would be to set up your 'menu' item to an event in your aspx.cs page, and ensure that postback is true for that item. Inside that event, write code to add controls to the page. When the user selects a menu item (I'm assuming you mean a listbox or similar?), the page will post back, and refesh with the new controls on the page.

A much harder way (depending on your background) would be to do it all in Javascript, if you know javascript. JQuery could probably help you out here. The advantage of Javascript is that the page won't need to refresh for the user to see the controls. A disadvantage is that the controls you can put on the page will be limited to standard HTML controls (Rather than controls properly hooked up to your ASP site).

If that still sounds confusing to you, I would strongly suggest finding a good textbook to get a good grasp on the basics of asp.net :)
 
Share this answer
 
Comments
TANicox 19-Feb-12 10:23am    
Thanks! Now seek about JavaScript or JQuery and I will try again

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900