This the html form:
<input id="picture1" name="Input_Pictures" type="file" value="" />
<input id="picture2" name="Input_Pictures" type="file" value="" />
<input id="picture3" name="Input_Pictures" type="file" value="" />
I also tried:
<input id="picture1" name="Input_Pictures[]" type="file" value="" />
<input id="picture2" name="Inpu...
Hi All,
In my application i need to disable the button once it is clicked so that user should not click more than once. APplication is MVC ASP.NET i have done this in normal asp.net application.
I tried below lines of code but its not working
thanks in Advance
edited
How can i implement this using javascript ?
...
Hi all,
I am using ashx file to show image which is generated runtime
<img alt="" style="height: 200px; width: 450px;"
id="Img1" src="<%= Url.Content ("~/Helpers/GetImage.ashx?side=Front") %>" />
Below is the lines of code to create the image
Is it right approach ? I am really worried should i use controller that return Image...
This is my first time trying MVC.
This code
<%= Html.LabelFor(model => model.Name) %>
produces this
<label for="Name">Name</label>
But I want this
<label for="Name" class="myLabel">Name</label>
How do you do that?
Thanks in advance.
...
I want to use dojo grid with asp.net mvc but i don't know how the server side function must look like(parameters and return json).
All the samples i've seen use a file as a source for grid.
Any tips?
...
This is more of an open question rather than looking for one specific answer.
As we all know there is no one answer that fits all solutions but I am curious to find out how you structure you asp.net MVC solutions and any pitfalls you may have come across in your design or things that you would do differently if you could start again.
T...
Hello
I'm trying to add a "fullname" in the route in my url, and I wonder which chars I should replace? Should I use _ instead of space? and what other chars might "need" replacing?
Mostly gonna use swedish names, but some might have some strange letters, not icelandic ones though :)
/M
...
I've started reading NerdDinner tutorial from scratch. While reading and coding application I came to part about some Helper methods and there was one example of some class (AddRuleViolations) but there was no any explanation WHERE to add this class. So I skipped this one and continued with tutorial without using this class later in code...
Hi,
I'm working on an ASP.NET MVC web application and I've made my own authentication module, which is session-based (no cookies). The problem is: When I rebuild my application, I'm automatically logged of (session is empty).
Normally this is not a big problem because my application is not 'automatically' rebuilding in a production env...
Hi
I have a Asp.net mvc applications and I need a create page.
My class as ;
public class OrderItemModel
{
public OrderItemModel()
{
SelectedItems = new List<MenuItem> ;
}
public List<MenuItem> SelectedItems { get; set; }
public string Address { get;...
Hi all,
I'm looking to write an ASP.Net MVC ActionFilter to redirect users of mobiles that aren't in the ambiguos smartphone category to our WAP site. Does anyone know of such code out there?
I've found http://detectmobilebrowser.com/, http://mdbf.codeplex.com/ and http://www.51degrees.mobi/Products/NETMobileAPI already. I prefer the ...
Looking around I see a lot of articles about localization in ASP.NET MVC, but they all do the same thing - setup a .resx file, set its build action to the right tool to make sure a class with static string properties is created, then use that class.
Is there any way at all to use an existing resource provider I already have? Or at the v...
I'm just trying to get back into .NET MVC with the new release and I can't get my head round the way may view is binding to the DataModel.
I have a model with a property "first_name" and within an HTML form I have the following
<%= Html.TextBox("first_name", Model.first_name)%>
<%= Html.TextBoxFor(model => model.first_name) %>
<...
All,
I have a website that is in use and has several users, using the MySqlMembershipProvider.
We have had a few users that have been locked out (for some reason) and recently I unlocked them and reset the passwords, using the MembershipUser.UnlockUser and MembershipUser.ResetPassword methods.
Now they are definitely marked in the dat...
Hello, I am semi-new to ASP.NET MVC. I am building an app that is used internally for my company.
The scenario is this: There are two Html.Listbox's. One has all database information, and the other is initally empty. The user would add items from the database listbox to the empty listbox.
Every time the user adds a command, I call a j...
I get a 404 error when I navigate to the following URL using the route below:
http://localhost:53999/properties/
However, all the following are correctly routed to the List action in my controller:
http://localhost:53999/properties/usa/new-york/manhattan/12
http://localhost:53999/properties/usa/new-york/manhattan
http://localhost:53...
Hello,
If I want only administrator to access the action called "ManagerUser", I know I can do this:
[Authorize( Roles = Constants.ROLES_ADMINISTRATOR )]
public ActionResult ManageUser( string id )
{
}
What if I want to give everyone access except to administrator? I do not want to write all roles up there on function :|.
Any recomm...
I was reviewing the code for KIGG and noticed that there are so many Interfaces. I am fairly new to MVC and do understand what an interface is, a bit.
How does Interface work in MVC, why is it used?
...
Within an ASP.Net MVC model binder is it possible to create an object of the bound type and then update the properties on it.
e.g.
public override object BindModel(ControllerContext controllerContext,
ModelBindingContext bindingContext)
{
ParentType boundModel = null;
if (bindingContext.ModelType == typeof(ParentType))
...
I have searched for examples and found several but they are whole large projects. I am looking for some sample on how to get started building an MVC multi-tenant application. I think, the first part would be to decipher the url.
In ASP.Net this is how I did it. I got this from looking at DNN code. How would I do the same in MVC?
Global...