injecting controls
-
hi, when using placeholder we can inject a contol to a page wich the control is instantiated.pretend that a user has built a page wich is asp.net page (with asp.net controls and maybe asp scripts)but it is not saved as asp.net page or usercontrol on the server so it is in the sql and every time the user requests his page we want to load his page and render all of the asp.net controls in the page,like what it is in the cms applications,i want to know how can i do this ?
-
hi, when using placeholder we can inject a contol to a page wich the control is instantiated.pretend that a user has built a page wich is asp.net page (with asp.net controls and maybe asp scripts)but it is not saved as asp.net page or usercontrol on the server so it is in the sql and every time the user requests his page we want to load his page and render all of the asp.net controls in the page,like what it is in the cms applications,i want to know how can i do this ?
-
You can use the Page.ParseControl method to parse a string into a control, then add it to a placeholder.
--- b { font-weight: normal; }
-
hi there, the point is what if i want to parse a complete asp page,is there any way to do this?
why? Change your design. you might as well save it as an html page and just display it
-------------------------------------------------------- 1 line of code equals many bugs. So don't write any!! My mad coder blog
-
hi, when using placeholder we can inject a contol to a page wich the control is instantiated.pretend that a user has built a page wich is asp.net page (with asp.net controls and maybe asp scripts)but it is not saved as asp.net page or usercontrol on the server so it is in the sql and every time the user requests his page we want to load his page and render all of the asp.net controls in the page,like what it is in the cms applications,i want to know how can i do this ?
Actually, maybe look into web parts and build sections of the page There would be no need to chache the page into the database. If you need to then you would need to serialize all control states on the page. And really that doesn't make any sense to do it that way. Change your design to save the values you need into a serialized object or the database. That would be a much better decision. Your not thinking an object oriented way.
-------------------------------------------------------- 1 line of code equals many bugs. So don't write any!! My mad coder blog