I have a view page with model validations and client side validation enabled. I have a submit button which on click I have called a javascript function which uses jQuery for an AJAX call to the server..but I want to stop the AJAX action when client side validations fails. Any idea how to?
<% Html.EnableClientValidation(); %>
<% using (...
Hi,
I currently have a method in my controller which accepts a form collection, saves the data, and then displays the data in a 'Details' page. At the moment, the code currently looks something like:
[HttpPost]
public ActionResult Create(PersonModel person)<br>
{
if (person.IsValid())
{
person.additionalData = "Person c...
Hi all I want to open one page on call of this btn so i did following code in javascript but i want this to be done on server side so what is replacement to this code on server side..
QueryString = 'Export.aspx?CallerModule=EvaluationFBExport&ExternalAssessmentId=' + txtSendArray
window.parent.frames[1].frames[0].locat...
Hi,
As a follow on from one of my previous posts (ASP.NET MVC2 Master Page - Server side script not rendering, first bracket being escaped) I now having a similar problem.
This time it is with trying to dynamically set the properties of a UserControl.
*For anyone familiar with N2CMS, it is the AdvancedPager control.
Here is what I a...
I am looking for the best method for creating a drop down list editor template with MVC. There seem to be various methods but I can't find any method that is best, everyone seems to do it differently. I am using MVC3 with Razor as well, so a method that works with this is preferred.
...
I'm trying to wrap up a custom authentication system for internal use for a project I'm working on in MVC.
We currently have a partner that hosts an external site with forms authentication. Certain sections of this site redirect to a section on our internal site. Passed along with this redirection is an id and a session id. They pr...
I'm trying to deploy a MVC application to a news Server, I have .net framework 4 and ASP.net MVC2 installed. My app pool is assigned to .net 4, integrated mode. But for some reason, the routing is not happening properly. I am getting a 404 error on links and not properly routed to the controller. What am i missing here? Is it might be or...
The following line on page 110 of Pro ASP.NET MVC Framework does not make sense to me:
string links = ((HtmlHelper)null).PageLinks(2, 3, i => "Page" + i);
I don't understand what is the null doing in the above statement?
I was unable to do .. HtmlHelper.PageLinks(....)
Is the PageLinks Method an extension method?
...
I want to be able to Ajax-ly retrieve JSON data from some kind of web service. (The web service calls will be wrapping a call to SQL, processing the DataSet returned, and returning a JSON representation.) Initially, I thought an ASP.NET MVC project with appropriately named Controllers and Actions that return JsonResults would suffice. Ho...
Hi,
I do not understand how the following unit test instruction
string links = ((HtmlHelper)null).PageLinks(2, 3, i => "Page" + i);
maps to actual code as follows:
<%= Html.PageLinks((int)ViewData["CurrentPage"], (int)ViewData["TotalPages"], x=> Url.Action("List", new { page = x})) %>
The part that confuses me is that how...
i => ...
Pagination with MVCContrib is easy, just follow the steps here;
http://mvccontrib.codeplex.com/wikipage?title=Grid&ProjectName=mvccontrib
However the control render as
"Showing 1 - 15 of 32 first | prev | next | last"
This does not look very good. I would prefer a cleaner look with each page displayed as a link; "Pages: 1 2 3".
...
Hey guys,
I'm working through a sample .Net MVC application. I've added the aspnet membership api tables to an existing database. I've modified the web.config file as follows:
<connectionStrings>
<add name="ApplicationServices" connectionString="Data Source=localhost;Initial Catalog=nerddinner;Integrated Security=True;User Instanc...
What im trying to do is have an edit button that instead of opening the line for editing, it forwards you to a page where you can edit. Is this possible? I tried something with the client template, but the grid render is ignoring it completely.
...
I'm trying to use the Bitmap class to save a file to a directory but it throws an error. Articles tell me that the directory does not have write permission. How do I set write permissions on the directory normally? I saw this answer but its talking about nant. I'm using regular asp.net mvc.
Apparently I cannot manually set write permiss...
I might be wrong about what is actually happening here but i have 3 Html.dropdownlists. And im using jquery to handle filtering which does actually work. However, there is some odd behaviour which i think might be because data isnt finished loading before the next function is called.
For instance:
Some background.
Company: Owns sever...
Hi all,
this may or may not be possible (and could well be in the docs but i've just missed it).
How do i structure a Url.Action() inside my view using T4MVC that will allow me to use jQuery selectors. I've been attempting the following (in my javascript) without success:
function cancelHoldBooking() {
var url = '<%= Url.Action(MV...
I have a simple html form. The built-in HTML helpers are rendering. The markup is not created. What am I missing?
<asp:Content ID="Content5" ContentPlaceHolderID="IslandPlaceHolder" runat="server">
<%using (Html.BeginForm()){%>
<div id="manifest">Manifest Option: <%Html.DropDownList("docid",ViewData["manifests"] as SelectList);%><...
So, my question is that I have a model. My model has some data that is populated based on the id passed in through the url and set into a cookie, and the rest is user input, which is validated using data annotations.
The "problem" I've come across is how to handle this non user input data. Do I put it in hidden controls and thus infla...
I was working with the new version of ASP.NET MVC3 and examining the WebSecurity class. I've added System.Web.Webpages as a reference and am able to the use the WebSecurity properties and methods however i'm trying to understand how to configure it inside an ASP.NET page and not one built by WebMatrix. In the Webconfig file, I did noti...
I'm trying out the jQuery Validation plugin
jQuery Docs
Here is the markup of my form:
<% using (Html.BeginForm("action", "contoller", null, FormMethod.Post, new { id = "sxform" })){%>
<div id="manifest">
Manifest Option:<br />
<%= Html.DropDownList("docid", ViewData["manifests"] as SelectList, new { @class = "requi...