i have read somewhere about using layout template in asp.net wizard control but when iam using the same in my code a parser error is generated
'System.Web.UI.WebControls.Wizard' does not have a public property named 'LayoutTemplate'.
is there any way to solve this or is it true that it is not possible to use layout template in wizard control
i founded one answer that this (LayoutTemplate) is supported in dot net framework 4 and mine is 3.5 may be because of this.
Related
We are building a large ASP.net MVC 4 Website where one of the modules for Questionaire needs to build the view dynamically.
We are trying to solve 3 problems:
- Generate the view using data from the database (Control Name, Value)
- Have events against the generated controls (Eg: radiobuttion needs to have a change event and needs to enable/disable items accordingly)
- Validate the controls (possibly client side validation)
What is the best approach to do this? We have thought about generating view using Html helpers and Editor templates. The other options floating are using dynamic model and custom model binders.
While we are trying things through POC, any thoughts and solution to solve the above problem will be helpful.
Thanks
Here is a nice webcast from Brad Wilson : Advanced MVC 3.
Also check the source for this presentation. You will be interested in NonClassModels part. It shows how to wire all framework pieces around dictionary type. Validation, editors etc.
Hope this will help.
I have dropped a wizard control on the index page of an asp.net mvc 2 project. The button Next and Previous don't work.
Is the wizard control tailored for ASP.NET MVC2 ? If not can it be fixed and how ?
No it is not. I am pretty sure the WizardControl relies pretty heavily on ViewState which is not in MVC.
I did find this: asp.net mvc 2 wizard
No, the wizard does not work. For simpler wizards -- where you are really just breaking the data entry into pages to make it a bit more platable, we are building single big forms and then using the jquery formwizard plugin to break up the flow. Works like a charm and prehaps more capable than the old wizard was.
I am trying to figure out how to use/create a custom control in ASP.NET MVC 2.
I created a custom control earlier and compiled it (ccontrol.dll), the control renders a div, textbox and a button + some javascript in order to post a comment on the website. It could be a static aspx page that i wanted to allow my visitors to add a comment to. I would then drag my control from the toolbar to the aspx page and run it, it would then render all the code needed on the webpage including fetching the data from a datasource and displaying that inside the div. The user could also just type in a comment and press the button to save it to the datasource.
Is this possible to convert to MVC 2? Any good tutorial that covers custom controls and MVC 2? (Ideally would be if the control could be made into a .dll file that i then could reuse on future webpages)
How do i write a custom control the mvc way? Any good tutorials on the topic?
You cannot design Custom Controls according the normal asp.net style because in Mvc there is no ViewState and there are no server side control events. Data are returned back to the server through a Model Binding process. The fact that rendering and filling data in are handled in separated pieces of code make difficult to implement complex server controls in Mvc.
However, I developed a theory, and also a toolset to make quite easily custom controls ina Mvc too in the full spirit of the Mvc paradigm i.e keeping separation of concerns between Views and Controllers. See My Codeplex project. There, you will find pointers to documentation and tutorials on my blog. If you need assistance feel free to contact me.
No it is not possible to use custom controls in ASP.NET MVC. you need to re-write in MVC way
Can you recommend a tool that can analyze a SQL database table, read the table columns, and populate an .aspx page with appropriate controls (i.e. textboxes with matching labels)?
See this demo of ComponentOne InputPanel for WinForms for the functionality desired.
Are there any built-in tools for ASP.NET 2.0 WebForms that can help build a scaffold page for any given database table or entity?
Are there any free components out there to help achieve this goal?
Have you considered using an ASP.NET Dynamic Data page for this?
Here's a Getting Started video. It focuses on using VS 2008.
If you can't directly use the output of Dynamic Data due to a v2.0 limitation, you could perhaps fire up a new DD project in 3.5, and have the scaffold built for you. Then copy-paste the resultant markup, and paste into your 2.0 page. That would get you a head-start on not having to create all those asp:textbox and asp:dropdownlist controls yourself. You'd then have to wire up the DataSources as you see fit.
Is it any theme or css framework can apply to ASP.NET?
I work with ASP.NET webform, everybody known web controls generate pure html to work.
But i am not good at graphic design, so I want to find some UI helper.
I already work with jQuery and Ajax Controll Tookit, but it not much help to make a modern UI design.
I have found some commercial library like ComponentArt,DevExpress etc, but is it any free or opensource I can use?
Web Controls generate pure html. The only "odd" item that is added is the id of the control. In ASP.Net 4.0 you can determine how the ID is generated - including eliminating the id generated by the .Net Framework. You can set this in the web.config with the value
<pages clientIDMode="Static">
Read more about ClientIDMode here.
Now, you can add a CssClass to a control and use that to style, which is the best way to go.
You can search google for "ASP.Net Web Page Templates" or "ASP.Net Web Design Templates", but you are still going to have to handle some CSS yourself.