Suppose I have the following within a webpage
<% using (Html.BeginForm("ShowData", "Summary")) %>
<% { %>
<div class="dropdown"><%=Html.DropDownList("CourseSelection", Model.CourseList, new { @class = "dropdown", onchange="this.form.submit();" })%> </div>
<% } %>
When the user makes a selection from the dropdown the form is submitted...
I have been getting some weird page refresh in deployment and I can't seem to find the cause of it or replicate it in development. Is there a way for a javascript error or exception to cause a page reload? Or some tips to help me narrow down the cause?
It happens when deployed in the field and I can't replicate it while testing locally....
I am newish to MVC and understand all the great things about it, including the reasons why viewstate isn't available, however there are some circumstances where I think having some kind of view state will be quite handy, In my case I am thinking about list pages with various search filters that can be applied to the list.
Would it be wo...
Okay I'm very new to C# and i'm trying to create a little website using ASP MVC2.
I want to create my own authorization attribute. but i need to pass some values if this is possible.
For example:
[CustomAuthorize(GroupID = Method Parameter?]
public ActionResult DoSomething(int GroupID)
{
return View("");
}
I ...
Hello,
Using Visual Studio 2010 10.0.20319.1 RTMRel and SQL Server Express 10.50.1600.1 I'm trying to add a new SQL Server Database .mdf, however, I receive the following error:
A network-related or instance-specific
error occurred while establishing a
connection to SQL Server. The server
was not found or was not accessible.
...
I going to use Google Checkout to process orders to purchase downloadable content. When the order process is completed via Google Checkout I'd like for the user to be able come back to my site, authenticate using their Google credentials (OpenID?) that they purchased the item with linked back end, and download the goods. The site is wr...
In our current ASP.Net Webforms application we have several composite/template server controls that only exist for a common look and feel. For example, we have a panel control that has a title, a place for buttons related to the contents of the panel, and of course the contents. How is this best accomplished in MVC? RenderPartial does...
How can I check a session on a master page?
...
I have a view: User. In that I have an ascx page : Details
I have a view : Test. I want to access the Details from User from test, using render partial. How can I do that?
<%Html.RenderPartial("Details"); %> doesn`t work in this case.
...
I pass a ViewModel (which contains a "Person" object) from the "EditPerson" controller action into the view. When posted back from the view, the ActionResult receives all of the Person properties except the ID (which it says is zero instead of say its real integer)
Can anyone tell me why?
The controllers look like this:
public...
I have the following code which is not working as expected. I want to have a retrun from the controller and using alert display the value returned from the controller.
$('#change').dialog({
autoOpen: false,
width: 380,
buttons: {
"Close": function() {
$(this).dial...
Is it possible to return a string from controller upon a form submission ?
...
Given the code below within which I render a bunch of checkboxes in my view and the code for controller, someone please explain how can I get the values of the checkboxes (I need the key and the checked status) in the controller.
<% foreach (string mappingId in Model.Mappings) {%>
<tr><td>
<%=mappingId %><br />
<%=Html.L...
public ActionResult Create()
{
try
{
var Group = GroupRepository.FindAllGroups();
ViewData["Group"] = GroupRepository.FindAllGroups();
ViewData["Feature"] = FeatureRepository.FindAllFeatures();
DataTable dt = FeatureRepository.GetAllFe...
Is there a soft to do that?
I'm looking for a windows server (I might go for a VPS server), and I would like to know the ram I will need
I know I won't need a lot of ram, but beside the "windows task manager", is there a way to really test that?
Thanks
...
Hi,
It seems that the default ASP.NET MVC2 Html helper generates duplicate HTML IDs when using code like this (EditorTemplates/UserType.ascx):
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<UserType>" %>
<%: Html.RadioButton("", UserType.Primary, Model == UserType.Primary) %>
<%: Html.RadioButton("", UserType.Stand...
I have the folliwng JSON request code on an ASP.NET MVC web application:
var userID = 'id=' + $('#namesList').val();
$.getJSON('/Person/GetPerson/', userID, function(data) {
$('#collar').text(data.collarNumber);
$('#name').text(data.Name);
$('#email').text(data.EmailAddress);
});
Thi...
pleas help guys, my custom model binder which has been working perfectly has starting giving me errors
details below
An item with the same key has already been added. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where...
How can I update a partial view that is displayed as dialog?
I have to send error messages from the controller to the partial view that is displayed as a dialog, i.e in other words I want to update the dialog with the error messages
Please, I need an example how to do that?
...
How can I have ajaxoptions included in the following form:
<form id="" action="<%=Url.Action("ChangePassword",new{Action="ChangePassword" }) %>" method="post" enctype="multipart/form-data">
...