Whats the best approach to take if I want to include a Collapsible panel in a MVC3 web page. In a Non MVC3 page, it is as easy as to drag and drop an Ajax control from the tool kit. I want to get that same functionality in my MVC3 application.. Thanks in advance for the suggestions.
The AJAX Toolkit is built for ASP.NET Web Forms, while it may work using ASP.NET MVC, it's not really recommended.
I'd go with a, in my opinion, cleaner solution - try the jQuery Accordion.
I've used it in several MVC based sites, and hasn't let me down so far.
Related
I've converted a sublayout to a MVC rendering and it needs to be statically bound to another sublayout.
The old sublayout was bound using
<sc:Sublayout runat="server" ID="myID" Path="file/path/tothe.ascx" />
Now that the component is a rendering i've tried
<sc:Rendering runat="server" ID ="renderingID" Path="file/Path/ToView.cshtml"/>
and
<sc:Rendering runat="server" ID="renderingID2" renderingname="ReturnToSearchLink"/>
Neither have been succesful. Just nothing shows up and the rendering doesn't get hit while debugging. Any suggestions would be much appreciated
Out of the Box each page should be either WebForms or MVC.
Not advisable but if you really want there are solutions. Like the Hedgehog MVC aspx interop. I never tried statically bound, but you can give it a try.
See http://www.hhogdev.com/blog/2012/december/mvc-webforms.aspx
See Does anybody have experience in maintaining Sitecore MVC and Web Forms in a single solution?
It's not possible. You cannot have MVC rendering inside WebForms sublayout. MVC and WebForms are different technologies.
What you can do in Sitecore is a site which contains both MVC pages and WebForms pages, but you cannot mix them on a single page.
It's far from the most elegant solution but one option could be to use iframe's to embed the content between the different technologies.
If for example you have a webforms form you want in an mvc site, you setup a webforms page with just the form on and no margin or padding. On your mvc site you then use standard html iframe's to pull things in.
One challenge with this approach is getting the sizes of the iframes correct.
It definitely wouldn't be my first port of call in terms of solutions. However we've used in certain scenarios and it's saved us having to rebuild parts of the site in both technologies.
I have Coldfusion web application that has a CF query from a database table. This data is displayed in an HTML table with a checkbox beside each data item and an associated picture. There is Jquery functionality on the page so that the items can be re-arranged in the table based on the users preference. After the user finishes with their re-arrangement, it is re-displayed without the checkboxes for sending as an email. Note I did not write this application myself but inherited it...
I need to transfer this functionality to a asp.net C# web application but i am at a crossroads on how to proceed. I've looked at telerik controls and others but none appear to fit the functionality i need. Any solid suggestions?
I'd suggest to handle rendering of the table yourself. If you're using asp.net webforms, this can be done with a custom server control. If you're using asp.net mvc (which I suggest as MVC matches the coldfusion development model a bit closer than webforms), then it's much simpler and you can just do so in the view.
Once you are rendering the grid yourself, then it's simple to apply the jquery functionality on the client-side.
Without more info about what you can or can't do, it's a bit difficult to offer any more guidance. But you did only ask for suggestions :-)
Asp.net doesn't mean you need to use a library control built for .net. jQuery is powerful enough today, and it's not tied to any back end technology.
So, that being said, I would still go with jQuery and back it up with RESTful request using webservices with WebForms or controllers with MVC.
Have a look at this: JQuery Drag and Drop features with ASP.NET
I need to write a web page which I need to interact with Grid entry/edit.
I choose ASP.Net MVC and LINQ TO Entity Framework.
What my problem is I have two option to choose at View Layer.
ASPX
Razor CSHTML
Could someone please give me suggestion which one is more suitable to interact Grid Entry Edit process? And Why?
If there are any references , please let me see them also.
[UPDATED]
JQUERY Grid
Telerik Grid for ASP.NET MVC
Razor Web Grid
After I searching through at Google, I get more than one Grid Controls.
I still wondering which one I need to use.
When I was writing with net 2.0 framework, I use template control from GridView Control in traditional way to put Combo or some other controls to attatch with GridView.It is really useful.
So What i thinking is, at asp net MVC 3 version, should i also use these traditional technique as well.
Could anyone please give me suggestion?
Razor is simply more concise. Both Razor and WebForms will offer the same basic functionality, but Razor results in Views that are much less cluttered and therefore more easily understood.
View engines have nothing to do with this. They both provide the same functionality, which you use is up to you and your preference.
There are many kinds of grids available for MVC, but MVC itself does not come with a grid. You either have to build the grid yourself, or use a third party component, most of which are jQuery based. Again, it's up to you what to use, as it's your preference.
All you can do is choose something and go with it. If it doesn't work for you, choose something else. MVC is a technology that requires you to know much more about how the framework works. If you want point and click and drag and drop, you should go back to Web Forms.
.chtm provides "Mapping of Data(or Business) objects that Your UI needs to Render(the html)" in a isolated way, so you can control the Test Cases for your UI as well as your Business Object Unit testing, which is Hard using ASPX since you have to create HTTPContext and (SSL and all crap) just to TEST your Business Logic..in short .cshmt is more NEATLY TESTABLE than aspx.
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 new to ASP.NET MVC and I want to know your opinion about what is the best way to display some data from database using a <table>... an ASP.NET control or a jqGrid?
In which situation must each of them be used?
I appreciate any tips. Thanks.
If I understand correctly, the MVC model doesn't support the server-side event handling of standard asp.net controls, so I'd say that the jquery grid is definitely the best option.
Asp.net controls cannot be used in asp.net mvc.
The best way is to create a ViewModel classes and declare View as strongly typed.
I could continue but unfortunately don't know what exactly do you need.
Do you mean ASP.NET Controls or ASP.NET MVC Controls?
ASP.NET Server Controls should not be used in this framework... or rather, you should not use anything that relies on postbacks and/or viewstate. There are tricks to get some to work, but YMMV.
If the control is an ASP.NET MVC Control, that's a different story, and it will work ok.
JQuery controls also work since they are javascript controls.
use the MvcContrib grid. it is working fine