I am trying to get the base URL from the worker role. I can't get it from there.
How do I get the base URL in this situation?
I have found this property:
Application.Current.Host.Source
but, in order for this to work, I need the reference System.Windows.dll which is in the Silverlight folder. Since I am not using Silverlight for thi...
I'm having an issue with exceptions showing app as stack traces in the page.
I thought that I had mitigated this by adding this to the web.config:
<customErrors mode="On" defaultRedirect="~/error/GenericError">
<error statusCode="403" redirect="~/error/NoAccess" />
<error statusCode="404" redirect="~/error/NotFo...
I have a action result method in the conrtoller which returns a IList to my view. Now the Ilist returns set of rows from database. some of the columns in there are bit values. Now
when i am displaying those rows , the bit values are being displayed as true and false. I need to check in a IF condition if the value is true then display Ye...
I have an ASP.MVC application which has a silverlight app inside. I want to change the page when I click one of my buttons. Is there a way to make it?
...
I am using LINQ to SQL with C#.
Is there a method through which we can generate entity class files from the table schema?
By dragging tables onto the graphical designer classes are generated but they are not the real class files(i mean actual files with the extension cs).
I am aware of that we can code the class files first and then cr...
I'm working with both silverlight and asp mvc. The silverlight application performs a page request, and it works fine (into the test page generated by the VS), but I can't find a way to put it into my view.
MiniSIG
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverl...
Is there any documentation for ASP.NET MVC 2 Futures?
...
I've given some thought to implementing badges (just like the badges here on Stack Overflow) and think it would be difficult without Windows services, but I'd like to avoid that if possible.
I came up with a plan to implement some examples:
Audobiographer: Check if all fields in the profile is filled out.
Commentor: When making a comm...
Hello :)
Using MVC 2 I have been trying to make this record store project.
Creating records work but updating them doesn't. No exceptions are thrown either.
I examined getchangeset() right before submitchanges() it shows all zeros.
Thanks for your reading and you help :)
The Edit view:
<% using (Html.BeginForm("Edit", "Song")) { %>
...
I am using the s#arp framework and want to use the latest mvc contrib. This means that I have to use asp.net mvc 2.0. So I refrenced the latest 2.0 dll for mvc 2.0 and the latest mvc contrib dll but still get this error:
Error 1 Assembly 'MvcContrib, Version=2.0.36.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Versi...
Whats the simplest way of just returning an int from an Ajax MVC Action call?
I am currently trying:
public ContentResult Create(MyModel model)
{
return Content("1");
}
using (Ajax.BeginForm("Create",
new AjaxOptions {
OnComplete = "function(data) { alert(data); }"
}))
I get alert [object Object]. How...
Hello,
With ASP.NET MVC 1.0, we could write something like:
<label for = "FirstName">First Name:</label>
Which displays "First Name:" on screen. Now, with ASP.NET MVC 2.0, we have
<% = Html.LabelFor(model => model>FirstName)%>
Which displays "FirstName" on the screen. It looks to me a little odd to display things like FirstName, L...
I am using ASP.NET MVC 2 & .Net 3.5 with Visual Studio 2008.
Ok, what I am referring to by 'Wizard type page navigation', is a site where you have a list of stages in a given process or workflow. There is some kind of visual denotation to indicate which part of the stage you are at. I have already implemented this part (albeit, it smell...
When implementing Edit action, I add two methods for Get and Post: Edit(string id)
Ideally, they need have same signature. But of course this is not compilable. So I add a dummy parameter to HttpPost method (form in my case):
[HttpGet]
public ActionResult Edit(string id)
{
var user = Entities.Users.SingleOrDefault(s => s.UserID == ...
I am in the design stage at the moment and was wondering how I would update a table every 5 seconds.
My table will display read-only data returned from my model.
Normally my view would just have <table></table> HTML and then a foreach loop to write out the data.
However because I want to refresh this whole table every 5 seconds I am u...
I originally built my site in MVC 1.0 using the NerdDinner tutorial as a basic outline. Many of the early design decisions were made simply b/c "that's how NerdDinner did it" Since then, it has really grown and was converted to 2.0.
My validation still works the way NerdDinner did it and is very minimal, so although I've read about ot...
CS1928: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'DropDownList' and the best extension method overload 'System.Web.Mvc.Html.SelectExtensions.DropDownList(System.Web.Mvc.HtmlHelper, string, string)' has some invalid arguments
I am getting the user roles form the memebership provider and then asking the user to selec...
I can't find it in the toolbox anywhere. What control do I have available that is similar to a Windows Forms combo box?
...
I thought one of the benefits of using ASP.Net MVC2 was the cleaner and more logical markup you could make for a webpage.
I'm creating the design of my master page and when I try to run it I get this error:
Control 'ctl00_ImageButton1' of type 'ImageButton' must be placed inside a form tag with runat=server.
Here's the code:
<body> ...
Hi all, can the code that supports the model, view and controller be located in a separate project?
Thanks in advance.
...