I have a form element defined as:
<div class="field">
<div class="name">
<label for="User_LastName">
Last name: <span class="asterisk">*</span></label>
</div>
<div class="value">
<%= Html.TextBox("User.LastName", Model.LastName)%>
<%= Html.ValidationMessage("User.LastName")%>
</div>
</...
Hi,
I've created a html helper that adds a css class property to a li item if the user is on the current page. The helper looks like this:
public static string MenuItem( this HtmlHelper helper, string linkText,
string actionName, string controllerName, object routeValues, object htmlAttributes )
{
string currentControllerName = ...
Solution is called Portal which holds Areas/CMS/Login folder inside it. Login controller in CMS/Controllers is almost the same as AccountController in Portal solution. I customized Login and it works all fine except one thing: When I use [Authorize] filter and If user is not logged in than he is redirected to http://localhost:1177/Accoun...
I just ran into something in Visual Studio 2010 RC that wasn't previously happening (like, yesterday). No software changes here, but I did run into some muck yesterday when compiling that required a reboot.
I am unable to add LINQ to SQL classes to any project through the add dialog. I have created ASP.NET web sites, ASP.NET MVC projec...
Hi all,
I'm returning JSON from my controller to my view in order to populate a jquery autocomplete textbox in MVC. The problem is, some of my data contains commas, and therefore is split by the autocomplete helper.
Heres my code.
Controller:
public ActionResult GetData()
{
var data = repository.GetData();
re...
Recently I created a spike of a view engine, in which views are plain classes, and the content is created by using funny using-scope blocks.
The code together with a simple sample site is available at http://code.google.com/p/sharp-view-engine/
Here I'd like to hear your opinions regarding such an idea. Is it completely weird or maybe ...
I'm looking for a way to programmatically manage email lists and send large numbers of emails to these lists. The general idea would be similar to how social networking sites send email notifications when a friend posts new content. Since a user could have tens of thousands of followers, it doesn't seem realistic to send these directly...
I have data coming into my Model, how do I setup to insert the data in a table?
public string Name { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Zip { get; set; }
public Info()
{
using (SqlConnection connect = new Sq...
Consider the log in page on NerdDinner.com: http://www.nerddinner.com/Account/LogOn
Some nice features:
jQuery effects on the OpenID choice
popups for the other major providers
Is this revision of the NerdDinner AccountController and its View available for public download? How would you reinvent this implementation? Any code you can...
I've browsed around the other articles on StackOverflow that relate to caching WCF proxies for reuse, and I've read this article explaining why I should explicitly open the proxy before calling anything on it. I'm still a little hazy on the best implementation details.
My question is: when should I open and close proxies for service ca...
I am creating an ASP.Net MVC website that I am launching soon in private beta.
What I am using.
ASP.NET MVC 2
ASP.NET Sql Membership Provider
Authorization Attributes on ActionMethods. ex. [EditorsOnly]
What I am trying to accomplish:
During the private Beta period of my website, I want no anonymous users to access my site.
Only ...
also, what day is today and why do I have an ugly unicorn as my avatar ;-)
...
I am going to start a project of my own, which will be ASP.NET MVC + Fluent NHibernate. I want to use test-first approach as much as I can. So, where exactly do I start from? Database schema? Domain model? Mapping domain model classes to the database?
...
Hi.
Look on my code that i created in a partial View:
<% foreach (Customer customerInfo in Model.DataRows) {%>
<tr>
<td>
<%=Html.ActionLink(
customerInfo.FullName
, ((string)ViewData["ActionNameForSelectedCustomer"])
...
I'm really new to ASP.NET MVC, and I'm trying to integrate some Javascript into a website I'm making as a test of this technology.
My question is this: how can I insert Javascript code into a View?
Let's say that I start out with the default ASP.NET MVC template. In terms of Views, this creates a Master page, a "Home" View, and an "Abo...
Hello,
We're building a survey system and utilising ASP.NET MVC and wondered if anyone can offer suggestions on the architecture.
Here's the problem we're trying to solve. Essentially an agency sends out several surveys every year. They're very structured and not like SurveyMonkey style of surveys - they're actually applications of fee...
Consider an ASP.NET MVC application that requires a session variable be set. It's used throughout the app. It'll be set by either reading a hashed value on the browser cookie, or after having the user login.
In the WebForms + Master Page model, I'd check the Page_Load() of the master page. Perhaps not the ultimate event, but it was an e...
I have the following controller:
public ActionResult Search(string Name, int? Friend, int? Page)
It works if I use this url localhost/users/search/name but these don't localhost/users/search/name/1 and localhost/users/search/name/1/1
...
Quite some time i`ve learnt MVC. I have seen various techniques to post data :ajax post and form post.
Is there any other?
I`m quite confused about which technique to use and when?
Can anyone help me on this part?
...
I can run my Asp.Net MVC 2 application without an issue on my local computer. Just Run / Debug.
But if I have already built it, I can't publish it! I have to clean the solution and publish it again. I know this is not system critical, but it's really annoying. "One Click Publish" is not "Clean solution and then One click publish"
The e...