» Home » MVC3 » Page 1
ASP.NET MVC3: DisplayTemplates does not show model value (MVC3 Partial Page)
by bmg in Programming Languages

For learning DisplayTemplates, I created a “String” DisplayTemplate as listed below. It is expected to append the word “Hello” after the model’s string value. But it is showing only the word “Hello”. How do we correct it?


Note: String.cshtml is added under ViewsContactDisplayTemplates


public class Contact
{
public string FirstName { get; se

Asp.net mvc3 How to display byte as string? Asp.net mvc3
by George H. in ASP & ASP.net

I have Gender attribute as tiny int in Db for employee. When user create new employee i want him to choose male/female (which is working properly) by clicking on radio button. Everything is working fine (create and edit) but i want to display in form (for index, details and delete) not 1 or 2, but male/female. there should be some if statement in view but i'm not sure where to put it or how to


asp.net mvc3, c#
by dantino in C & C++ & C#

Is there an easy way to pass an object from my controller to view to controller?


I tried ViewData["compaignId"] but that didn't work.


Controller "Content" :


ViewData["CompaignId"] = id;

View "Content" :


<div>
@Html.ActionLink("Go To Team Creation", "Team", ViewData["CompaignId"])
</div>
TAGS : mvc3

asp.net mvc3,c#
by CodeAndLearn in Programming Languages

I want separate friends facebook and twitter.
Like this :


Twitter Facebook


EditorTemplates: FriendModel.cshtml


@model App.Web.Models.FriendModel
<div>
<input type="checkbox" name="saveInputs" value="@Model.FriendID"/>
<img alt="" src="@Model.ProfileImageUrl" />
<strong>@Model.Name</strong> Frien
TAGS : mvc3

Asp.net MVC3 Help regarding URL's
by Pepe Araya in Programming Languages

I am making an application using Asp.net MVC,


I have a url which is generating dynamically like
http:localhost:4351username


I want the functionality that if a user copy it on address bar it'llredirect to a new address
like


http:localhost:4355usersprofileusername


I've a controller named users and an action named profile defined in it


How to hide id in the url (MVC3)
by CodeAndLearn in Programming Languages

Problem


In my project i decided to imlement a custom menu provider using a db stored entity "Section".
So the section is mapped to the following Model:


public class TopMenuItemModel : BaseTrivitalModel
{
public TopMenuItemModel()
{
ChildItems = new List<TopMenuItemModel>();
}
public int ItemId { get; set
TAGS : hide MVC3

MVC3 POST do GET
by JEDIYoda in Programming Languages

I have a bit of a problem with POST in MVC.


I have my model


[ScaffoldColumn(false)]
public int Id { get; set; }
[ScaffoldColumn(false)]
public Guid UId { get; set; }
[Required(ErrorMessage = "Indtast dato")]
[DataType(DataType.Time)]
public DateTime Date { get; set; }
[Required(ErrorMessage = "Indtast
TAGS : MVC3 POST

How to redirect url in mvc3?
by MikeG in Programming Languages

I have mvc3 application here my problem is on same page i.e on Index.cshtml
i have two partial view controlpartial.cshtml and webgridpartial.cshtml


now when i'm inserting data into database it works fine and page gets redirect to Index.cshtml and URL also gets clear.


But at the time of edit when i clicked on edit b

TAGS : redirect mvc3

Google map in ASP.Net MVC3
by RomanMtz in ASP & ASP.net

i want to implement Google map in my ASP.NET MVC3 application. i already have Google map code and i want to add Get Direction for any specific City or Country, means i want to add a text-Box in View(HTML) where is enter the "Delhi" and click the GetDirection button then map will show the Delhi in India Map.


my Google Map Code in View(Razor) is below:-


@{
View
TAGS : Google MVC3

Asp.Net MVC3 Web grid
by Floubadour in Programming Languages

why this webgrid iterate every row in grid ??


@model IEnumerable<Blog.Domain.Model.BlogPost>
@{
ViewBag.Title = "Posts";
Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}
@Html.ActionLink("Add Post", "Add", "Blog")
@{
var grid = new WebGrid(Model);
}
@foreach (var items in Model)
{
<div id=
TAGS : MVC3 grid

Next
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .