How do I make a textbox read only in mvc? I have included the following snippet, but it`s not working.
<%=Html.Textbox("test", "test", new { style="border: 0px; width:280px" ;readonly=true}%>
I am using annotation based mvc and I am trying to get access to request and response objects using this method declaration in my controller.
@RequestMapping(method=RequestMethod.GET)
public String checkRequest(Model model, HttpServletRequest request, HttpServletResponse response)
But I get an error saying GET method not supported.
I need the request and response to pass it to another API call.
how do you trigger a MVC application.
im only used to use procedural coding. since everything are classes, how do i trigger the first method, where should this method be put, and what should the class holding this starter method be called?
thanks
Hi there Iam using asp.netmvc to do model binding, when I pass a model to a view, I am able to see the model data displayed in the form inside a label,
<%= Html.Label(Model.title) %
<%= Html.Label(Model.description) %
however, I am not able to do the same using
<%= Html.TextArea(Model.description)%
is there a syntax difference between displaying in a label as oppsed tp a textbox
I am creating an framework in PHP, and i am using and MVC structure. My link look something like this: mydomain.com/controller/action
So this link loads a controller, which loads the needed action. Now my page needs a header, footer, and it has a menu which is in the database. Where do i load all these things.
Is this the job of the controller, or the job of the model.
I was just wondering about the opinions out there. What do you think promotes faster development times for a web application? Silverlight or .Net MVC?
And could Silverlight be a replacement for a true http web application?
Feel free to rant or give as much details as necessary.
I have a MVC application and using the entity framework model for MYSQL database.
I what to save hindi text in database.
When I using the hindi text then it is showing ?? in database.
I am using ckeditor to enter the text
How can I save the hindi text.I have also changed the collation to utf-8.
Thanks
supriya
Hello,
I was trying Ninject in a Asp.netMvc application and I was wondering what the best practice is for using Ninject if you have more than 1 project in your solution.
I guess all projects need some kind of Loader which you initialize in the global.asax?
Kind regards,
Pickels
I noticed that MVC lets you pass in LINQ to SQL objects to its views and it will autogenerate Create, Update and View Pages based on the LINQtoSQL object.
Is there anything for webforms that lets you do this kind of thing? (In a nice way with validators maybe?)
Right now I am writing a simulation program which output is formatted according to certain factors. The question is in a MVC architecture, where is the conditional formatting to be taken place? What are some strategies for implement this feature?
FYI, The platform I am using is rather bare-bone in its GUI/front-end execution. To change color and formatting, it requires a change to the formatting state (much like OpenGL).
Is there an add-in for the VSIDE that allows you to visually construct ASP.NETMVC solutions? Back in my struts days there were a number of options that made hooking together Views/Models/Controllers easy and interactive.
How do i get an IGrouping result to map to the view?
I have this query:
var groupedManuals = manuals.GroupBy(c => c.Series);
return View(groupedManuals);
What is the proper mapping for the ViewPage declaration?
Inherits="System.Web.Mvc.ViewPage<IEnumerable<ProductManual>>"
I'm currently using and enjoying using the Flex MVC framework PureMVC. I have heard some good things about Cairngorm, which is supported by Adobe and has first-to-market momentum. And there is a new player called Mate, which has a good deal of buzz.
Has anyone tried two or three of these frameworks and formed an opinion?
Thanks!
I'm working on the MVC app where I've to generate the report in the form of HTML page. If the user click the print icon, I've to show the HTML page to user. If the user click on email icon, I've to send email with same HTML page attachment. I'm trying to find a way where I can use the same code to generate the HTML in both cases of email and print. Please provide your suggestions.
how to call a oracle database storedprocedure from asp.netmvc using nhibernate and how to use sys_refcursor to display a data in view pages give me sample application . thanks
I have the following asp.netmvc 3 razor code, where "item" is my model,
<a @if (item.Selected) { class="youarehere" } href="@item.Href" title="@item.Title">@item.Description</a>
This code throws up the following error,
CS1513: } expected
which is pointing to
class="youarehere"
portion of the code, but I could not figure out why. Could someone help point out how to fix it please? Thank you.
Hi folks,
is it possible to add a dot format / .format to the end of any route in ASP.NETMVC .. with a default being html or something?
and of course the .format is an optional value.
sample routes:-
http://whatever/controller/action.format
http://whatever/controller/action
those goto the same action method.
cheers!
Is there any IOC container that already implements a controller factory compatible with asp.netmvc2.0 ....if so i'll move my projects to 2.0 to test...
Anyone know a good reference about it?
I'm working on a ASP.NETMVC project where we have decided to use Fluent nHibernate for dataccess. To enable loose coupling we go for a IoC/DI pattern. My questions is what IoC tool to go for. I've tried to find the differences between windsor, ninject, spring, structuremap and unity, but it's difficult to see the benefits each one has to offer. Whats your experience?
Here's the easy pseudo-code:
void TextBox1Changed()
{
//If the text isn't a number, color it red
if (!IsValidNumber(TextBox1.Text)
TextBox1.Color = Pink;
else
TextBox1.Color = WindowColor;
}
What's the MVC enterprisey version?
Hi Guys,
We are trying to build a cross-domain single-sign on solution using ASP.NETMVC. Something which works like this:
User hits www.test.com [or www.test2.com or www.test3.com or www.testN.com]
User clicks widget, login appears
User signs into www.example.com from 2) i.e. from widget [x-domain signin]
User is now logged in on www.test.com [authenticated from www.example.com]
User visits [www.test2.com or www.test3.com or www.testN.com] and is signed in to www.example.com
Any existing solutions or tutorials available ?
how can i check if a user is logged in in user control with asp.netmvc
usually on a view page i use this
<% if (User.Identity.IsAuthenticated) {%>
//Do something
<% } %>
but i can't get this done on a user control
I want to deploy my .netMVC2 appication on IIS6.0.
Will it require to change route path in global.asax file.
In my application i have used html link, ajax request and Html.ActionLink.
The code lines in the Global.asax file are:
routes.MapRoute(
"LogOn",
"{controller}/{action}/{id}",
new { controller = "Account", action = "Index", id = UrlParameter.Optional }
);
Please suggest me.
Thanks and Regards
Munish
how i can handle this url in my website who is developed in mvc2
website.com/topic
website.com/topic/topic
are you give me some code to learn url routing in mvc
Hi,
I came across the library Spring-JSON while looking to add Ajax Support in my spring mvc webapp 2.5.
My question is, has anybody here have used this library and what are your experiences?
Is there any better alternative than this?