I was wondering if anyone knew of a good way to help me navigate a MVC ASP.Net solution.
Here is the set up:
I have a MVC ASP.Net Web Project that calls and references a WCF service.
Is there a easy way to link the javascript ajax calls that call the controller actions, and then from the controller to the WCF service.
VS is great about the goto definition but that breaks down with both javascript and WCF.
Is there a way to add a comment that you can click on that will take you a method in a certain class?
I always use the CTRL+,(comma) shortcut when I have my cursor on the name of the c# method I want to browse to as a shortcut. This brings up the Navigate To UI element, and shows you methods, fields, properties, and files that match the item under the cursor, or highlighted text.
Related
I want to have in my website aspnet mvc 5 application, some kind of user control that work as an ajax image uploader so i can put it where i need in my website.
It's possible this? i could think in create a partial view with the code but it must have javascript and i don't want that. Is there another way? to have JS and Razor in a view that can be used in different places as a user control?
maybe using a #helper? but in this case i don't know if helpers can have JavaScript
I want to build an application which contains a basic menu (with, lets say 10 buttons), each button is a subject in my girlfriend's psychology course. when i click a button, i will be transfer to the specific subject's menu. (so i have 10 sub-menus like this).
In each sub menu, i can press buttons as well, but this time i wil get some sentences which i saved in mySql data base.
I know how to build the most of the server side part using spring (i know how to build the controllers and service layer) hibernate part (i know how to build the domains and DAO layer),
My problem is, that i don't know if i should use html+css+java script in order to build the menus and configure the functionality and communication between the controller and the client, or maybe should i use Jsp+Jstl?
Sorry for my lack of knowledge, i know this is quiet fundamental..
by using jstl tags you can build
like
<c:out value="${name}"/>
I have been working on a spring roo project and I've hit a wall in terms of being able to customize the web page.
The main thing I want to do is be able to dynamically hide certain fields as the client is filling out the web form. I have a drop down list driven by enumerations that has 4 options and a fifth "other" option. If the user selects "other" I want a text box to appear so the user can fill out their own selection.
I was talking to someone and they said "This really depends on the UI you choose. In case of MVC scaffolding you can use javascript to drive these relationships". I am indeed using MVC scaffolding so I guess I have to use javascript. I don't really know that much javascript but the problem lies in that I don't even know where the javascript code would go in term of my project files. And then the second problem of course is how to use javascript to hide the fields dynamically in Spring.
Thanks
Spring MVC scaffolding uses dojo by default as its javascript framework.
You are able to use standard dojo functions when you attach events to DOM elements. You can simply use the <script/> tag to contain your own custom javascript methods within a generated .jspx page.
Additionally, you can integrate another existing javascript framework such as jQuery. At the moment you can include jQuery manually, but it can possibly be expected in a future Spring Roo version.
You can play safe with dojo for now.
I am in charge of converting an ASP.NET web application into fully AJAX based application. I know Javascript and Jquery very well.
Initially I thought to point every anchor tag's click event to JS function and to call stuff via ajax and to populate the body and so on. I encountered a problem when it came to ASP.NET Form on every page and when there was need to make a post-back. I decided to point every Form tag's onSubmit event to a JS function to post stuff using ajax and to get results and I got to know this is not possible with ASP.NET as every time where is a button click, there will be post back so it's hard to let page know what button was clicked.
I then decided to use ASP.NET built-in AJAX controls to use with Forms which is pretty easy and worked like the way they should.
Now I am stuck with the question of which I should go with?
I like to be JS way because it's more customizable than AJAX.NET. I highly need your suggestions.
I don't see a problem in using ASP.NET Ajax. The scriptmanager and UpdatePanel controls will make you task easy and fast to convert to and ajax enabled website.
I am not sure what kind of customization you are looking for but you can still use js way whereever necessary. One another plus point with ASP.NET Ajax is it is well tested and used by thousands of sites and comes with lots of controls like in ajaxcontrol toolkit.
If you want to convert a web forms application completely to JavaScript coding, this is going to be really hard to do. It would be a lot easier to use the updatepanel control to make it look asynchronous to the user, as this doesn't break the server-side integration. But if you are using JS to post back to the server, then wipe the UI and replace it with the new one every time, that's going to be a lot harder.
Ideally, the best way is to use web services, call the web services through JS code (either JQuery or using the Sys.Net.WebServiceProxy ASP.NET AJAX object) to stream the data and you build the client in JS.
Let me know if you want more info...
HTH.
Is there any way to use server controls in ASP.NET MVC?
Specifically I need to use the FarPoint Spread control in my application to display an Excel file that exists on the server with the ability to display updates on the client in real time.
The reason that I want to use MVC instead of webforms is that eventually we're going to scrap the excel files and create the views programmatically but I have to display these files now since we don't have time to create that functionality in this phase.
My suggestion would be to use WebForms for pages that need the custom control and MVC for everything else. In order to mix WebForms in MVC in the same application you'll need an IgnoreRoute call so MVC doesn't try to process .aspx files and you need to make sure everything needed for WebForms gets added to the web.config. Scott Hanselman has a great blog post here with the details.
FarPoint recently released a Spread component which is supported on the MVC platform .You can go through which blog which gives detailed information on using Spread with MVC 3 .I hope this helps.
http://www.gcpowertools.info/2011/12/using-grapecity-spread-for-net-with-mvc.html
I'm not sure how FarPoints control works, but if its anything like the aspose cells component I use, I dont think you'll have any problem.
As far as I'm aware, theres nothing to stop you using normal webforms controls anywhere in your MVC app, it's just that most rely on ViewState and the postback model (which arent present) and hence don't work properly.
There isnt really any UI rendered for the aspose excel control, so you should be able to just create an object, call some methods to set things up and then stream the generated file out to the response just the same way you would in a button click event.
This is all hypothetical, and I apologise in advance if this doesnt work!
Paul.
http://www.tumelty.com/