Click here to Skip to main content
15,879,535 members
Articles / Web Development / ASP.NET

Parichay (A Simple & Small Asp.Net MVC Social Network Starter)

Rate me:
Please Sign up or sign in to vote.
4.77/5 (20 votes)
22 Feb 2012GPL316 min read 205.1K   7.2K   48  
Parichay (A Simple & Small Asp.Net MVC Social Network Starter)
@model IEnumerable<Parichay.Data.Entity.MemberFriends>

@{
    ViewBag.Title = "Index";
}

<fieldset>
<legend><h2>My Friends</h2></legend>
<table class="tblAllBorders">
    <tr>
    <th>
    Friend's Info
    </th>
        <th>
            Createdon
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
    <td>
    <div>
     <ul class="bullet-arrow">
           <li><img src="@Url.Action("Avatar", "Media", new { id = item.Friendid.PicId })" alt="" /></li>
           <li>Name: @Html.DisplayFor(model => item.Friendid.Givennm)</li>
           <li>Institute: @Html.DisplayFor(model => item.Friendid.Institute)</li> 
           <li>Dept: @Html.DisplayFor(model => item.Friendid.Dept)</li>
           <li>@Html.ActionLink("View Profile","Index","Account",new{id=item.Friendid.Id},null)</li>
            </ul>

    @Html.HiddenFor(m=>item.MemberDetails.Id)
    @Html.HiddenFor(m=>item.Friendid.Id)
    </div>
             
    </td>
        <td>
            @Html.DisplayFor(modelItem => item.Createdon)
        </td>
        <td>@using(Html.BeginForm("RemoveFriend", "Friend", FormMethod.Post)){<input id="friendId" type="hidden" name="friendId" value="@item.Friendid.Id" /><input type="submit" value="Del" class="button" onclick="if(!confirm('This action will remove this user from your friends list. Would you like to proceed?')){return false;}" />}</td>
    </tr>
}

</table>
</fieldset>


<p>
    @Html.ActionLink("Find a Friend", "Find")
</p>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior)
Singapore Singapore
I love programming, reading, and meditation. I like to explore management and productivity.

Comments and Discussions