How is it possible to get values from a Html form to an Ajax.ActionLink method like the example below. Instead of "id=Model.DinnerID" I need to get the values of two textboxes that is in a Html form block?
<%= Ajax.ActionLink( "RSVP for this event",
"Register", "RSVP",
new { id=M...
Hi,
I want to create a view that contains two forms with their submit buttons.
on submitting form ajax update should happen.
So how Html herlper class will help me?
...
Which one is better to use in ASP.NET MVC?
...
I have used Ruby on Rails with ActiveRecord, so I am quite used to switching to Production/Development database.
I am wondering, how do people implement Development and Production Database difference in ASP.NET MVC (preferably with ado.net entity).
I tried to have it by creating 2 entity datasets with the same name in a different nam...
I currently have a login link on my application that looks something like this:
<a href="/login?ReturnUrl=" + <%= Request.RawUrl %>>Login</a>
I want to handle the POST command on the login page in the controller action below:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Login(string returnUrl)
{
// Authenticate user
ret...
I'm trying to verify the behaviour of my ASP.Net MVC app when an unexpected error occurs. Specifically, I'm trying to verify that the user is directed to the error page I've defined for my app. The problem I'm encountering is that I'm not able to verify the behaviour of the controller method as expected.
For my normal behaviour tests, I...
i have a simple form on my page with a textbox and button that calls this javascript method
onclick="Create();"
and this is the function that is ran...
function Create() {
var txt = document.getElementById("longTxt").value;
if (txt == "Insert Name") {
alert("You must provide a name");
return;
}
var d...
I created a business object (plain old class with properties, nothing fancy), that has an empty constructor, and I am using it as a strong type in my View for /Member/Create (see code).
This all works fine, I get the object "post back" from the Create View - and my method memberToCreate.Save() actually writes what it is supposed to, to ...
Inside of an asp.net mvc partial view, I have an Ajax form that posts a value and replaces the contents of its parent container with another instance of the form.
Index.aspx view:
<div id="tags">
<% Html.RenderPartial("Tags", Model); %>
</div>
Tags.ascx partial view:
<% using(Ajax.BeginForm("tag", new AjaxOptions { UpdateTarge...
I would like to call an action on a controller. Have the controller get the data from the model. The view then runs and generates a PDF. The only example I have found is in an article by Lou http://whereslou.com/2009/04/12/returning-pdfs-from-an-aspnet-mvc-action. His code is very elegant. The view is using ITextSharp to generate...
Basically, I log into my website using OpenId, very similar to what I am assuming SO does. When I get the information back, I throw it into a database and create my "Registered User". I set my AuthCookie:
FormsAuthentication.SetAuthCookie(user.Profile.MyProfile.DisplayName, false);
Then I can use this for the User Name. However, I ...
I have a pretty simple ASP.NET MVC Site Application. (MVC 1.0)
I have NO authorization sections in my web.config because I use the [Authoize] attribute on my controllers.
The default web.config for the server allows * for forms authentication, as expected.
I have 2 existing Windows 2008 dedicated (hosted) servers. The site works well...
Given the following markup:
<form method="post" action="/home/index">
Username:
<%= Html.TextBox("UserName")%>
Password:
<%= Html.TextBox("Password")%>
<input id="login" type="button" value="Login" />
<input id="Submit1" type="submit" value="submit" />
</form>
Can you tell me why the model binding is not work...
See the exception
I have a JS include in my master page and it seems to be tripping one of the routes every time.
Is tripping this route:
routes.MapRoute(
"CatalogType",
"Catalog/{group}/{type}/{index}/{browseSize}",
new { controller = "Catalog"
, action = "Types"
, group = ""
, type = ""
, index = ""
, browseSiz...
I am running Visual Studio 08 Team Edition with .NET Framwork 3.5 SP1 on WinXP. I am trying to add a Entity Data Model to my project, however, the option to add an "ADO.NET Entity Data Model" selection does not appear. To give you a visual, I am essentially following the directions here ( http://www.aspfree.com/c/a/ASP.NET/Introduction...
Hi,
I have an ASP.NET MVC app and I want to add
to each page a list of members online. Actually add to Master page.
Members belong to groups so I want to
show all members in there groups.
So what is the best way of doing this??
Eg On session start add to a collection that is in cache object
and remove it on session end in Global.asax...
Assuming Tools is my Controller, I specify '/Tools' in the ServicePath, and the action name 'GetToolsList' in the ServiceMethod. Can I fire an AutoCompleteExtender this way? How would I be able to pass the prefixText to the Action here? Or is it not possible?
...
I have a controller and I would like to require Authorization for all actions by default except a couple. So in the example below all actions should require authentication except the Index. I don't want to decorate every action with the Authorize, I just want to override the default authorization in certain circumstances probably with a ...
In the add new item there is an option to add report and add report wizard.
But I don't know how to work with that. Is there any blog or video available to learn that?
...
Hello All.
I've been using ASP.NET MVC for a few weeks, looking screencast, reading tutorials and so on. It turns out to be very interesting technology for me and I started to experimenting with it. I wrote simple web application which simply gets data from one table and shows it.
All works fine on my dev environment, but when I tried ...