asp.net-mvc

var javascript to asp.net MVC model

New to MVC, trying to pass a variable from Flash using FSCommand (works well with other functions) from one view to another. The Javascript I am using: function p1_DoFSCommand(command, args) { var p1Obj = InternetExplorer ? p1 : document.p1; if (command == "nameClip") { var FlashName = [args]; ...

Can i access ValidationMessage through jquery in asp.net mvc

Im trying to access ValidationMessage through jquery. I have <%: Html.TextBox("vcr_LinkAddress",null, new { maxlength = 255 })%> <%: Html.ValidationMessage("vcr_LinkAddress")%> and i want to validate textbox and if it is empty ill print a message in ValidationMessage ...

asp.net mvc membership - caches login info and shows on different applications

I've asked similar question here because I thought the problem was in my custom membership provider. Then I tried this: I created two NEW asp.net MVC applications. In first one, I registered as new user using default membership provider. I closed this application, opened second one and ran it. In this application I was also logged in a...

Route always goes to the first maproute

I'm trying to create URIs that look a little something like this: http://hostname/mobile/en/controller/action for mobiles OR http://hostnamem/en/controller/action for desktop (non mobiles) My Route table currently looks like this (Global.asax.cs) ` routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( ...

Does someone have an example on how to use CookieTempDataProvider?

Details: ASP .NET MVC2 with MVC Futures for MVC2 ...

Forms Authentication & IIS7 (&MVC): Why ReturnUrl=/ is added?

When trying to access my site: www.X.com The browser changes the url to: www.X.com/ The problem is that the result url is: www.X.com/HomePage.aspx?ReturnUrl=/ (HomePage.aspx is the default page) On IE: www.X.com/HomePage.aspx?ReturnUrl=%2f For some reason the Forms Authentication treats / as a page that the user is trying to acc...

How to pass a delegate to create an expression tree that is a MethodCallExpression

I'm looking to 'generalise' some code in a .NET 3.5 MVC application and have stumbled into a problem. Background I have a SomeController class with some actions: public ActionResult Renew(string qualification, int tierId) { ... } public ActionResult Reinstate(string qualification, int tierId) { ... } public ActionResult Withdraw(strin...

How to pass query string parameter in ActionLink in MVC

Hello All: I am having following action link: <%= Html.ActionLink("Check this", "Edit", "test", new { id = id}, new { style = "display:block" })%> How to include "data=name" as query string. Some thing like link?data=name Thanks Ashwani ...

How to call Jqgrid On Submit in MVC

I have to search an Image in the database and show it in a Jqgrid using MVC. Onclick with textbox value I am able to get it in Jqgrid but after loading the page it is getting refreshed and my grid dissappears. What to do to stay the grid in the same page when the page get refreshed. <%Html.BeginForm("Index", "UpdateBatchStatus", FormMet...

Do we need Microsoft.Web.MVC, I using ASP.NET MVC 2.0?

Hello, I have upgraded my solution from VS2008. In our web project there are 2 references to ASP.NET MVC, the Microsoft.Web.MVC and System.Web.MVC. When I try removing the Microsoft.Web.MVC dll from the project and remove it from the web.config. After I do that I get compiler errors? I thought the System.Web.MVC has all the same function...

Internet Explorer Nested Form Post

I'm am using ASP.NET MVC to create a page that posts to the Paypal sandbox. My form that posts to the Paypal site is nested inside a parent form. I am using Internet Explorer 7, and for some reason, the nested form posts to my local machine instead of the paypal site. If I add a copy of the same nested form directly after the first, the ...

jQuery DateTime picker

Hi, I have a textbox with jquery ui datetime picker. When i open the page jquery clears my textbox.(Textbox has a default value) Is there any way to prevent this action? View: <div class="editor-field"> <%: Html.TextBoxFor(model => model.Start, String.Format("{0:g}", Model.Start)) %> <%: Html.Validation...

IIS 7.5 default documents and ASP.Net MVC 2 Routes

I am trying to deploy a website on Win Server 2008 R2 machine with IIS 7.5. The website is developed with asp net mvc2. My client asked me to deploy a simple .html document to be served until we decide to go live with the mvc app. I have created the website and published my site for testing and it works perfectly, but I cannot make my ap...

Tab implementation handling in ASP.net MVC between view and controller postback

Hi All, To implemt tab JQuery is used <script type="text/javascript"> $(document).ready(function() { $('#tabs div').hide(); // Hide all divs $('#tabs ul li a').click(function() { //When any link is clicked $('#tabs ul li').removeClass('active'); // Remove active class from all links $(this).parent().ad...

ASP.NET Custom Windows Authentication

Is there any way to have a custom form for Windows authentication so that the device used when authentication doesn't need to support NTLM in order to work? Also, is there a way to keep the automatic login for intranet users so that they do not need to login if they are already on their computer? ...

Dropdownlist selected item not getting displayed in Asp.net MVC

Hi all, I have implemented dropdown list in asp.net mvc using following code In controller int iSelectedNode=2; ViewData["ddlModels"] = new SelectList(Models, "ModelCode", "ModelName", iSelectedNode); In View <%= Html.DropDownList("ModelCode", (SelectList)ViewData["ddlModels"],"--Select--", new {id="ddlModel" })%> Still all th...

Running MVC .net 4.0 application in the same domain as an existing forms 3.5 application

Our company is currently running a asp.net Webforms 3.5 website as the default website on a Server. I would like to add a new asp.net MVC application (using .net 4.0), but be able to use Single Sign-On authentication from the forms app to the MVC app. How can I do this? I tried added the MVC app to the default website, but the MVC app...

How do I redirect to the login page in a AJAX Form (Ajax.BeginForm)?

In MVC, how can I properly handle a page time out in an AJAX Form. Currently when submitting an AJAX Form, the DOM of the AJAX form is replaced by the login page content. I would like to redirect the entire page to the Login page. I have an ASP.Net MVC application with a Partial Form inside an Ajax form (AJAX.BeginForm). The applicat...

WCF Session Service hosted in ASP.NET MVC 2.0 application

Hello, I have a must to host WCF Service using WCF Session mechanism. I've read http://msdn.microsoft.com/en-us/library/ms733040.aspx but it is not enough... My simple scenearion: I have solution with 4 projects. First - SessionWCF.Base, it is simple Class Library that contains base interface IServiceBase for my service. using Syst...

Found conflicts between different versions of the same dependent assembly Web Application VS2010?

Hello, we have a Asp.Net MVC 2.0 application. In Vs2010 solution Explorer there is only a single System.Web referenced from the GAC (4.00). When I run the deploy project I am getting compile warnings stating "Found conflicts between different versions of the same dependent assembly?" I opened our dll from our website with reflector and s...