PDA

View Full Version : سوال: گذاشتن گزینه پاسخ در صفحه پیام...



usefzade
سه شنبه 11 شهریور 1393, 00:06 صبح
@model CharmIran_Web.Models.Message.Message


@{
ViewBag.Title = "ShowMessage";
var sendername = new CharmIran_Web.DAL.CharmIranContext().UserProfiles. FirstOrDefault(u => u.UserId == Model.SenderUserId).UserName;
var title = ViewBag.SenderRevieverName ? "نام ارسال کننده" : "نام دریافت کننده";
}




<div class="alert alert-success" style="display: none;"><strong id="result"></strong></div>


<div class="row-fluid">




<div class="control-group">
<label class="control-label span2">@title</label>
<div class="controls">
@Html.TextBox("RecieverUserId", sendername, new { @readonly = "readonly", style = "width: 250px; " })
</div>
</div>


<div class="control-group">
<label class="control-label span2">عنوان پیام</label>
<div class="controls">
@Html.TextBoxFor(model => model.Title, null, new { @class = "span5", @readonly = "readonly", style = "width: 450px; " })
</div>
</div>


<div class="control-group">
<label class="control-label span2">متن پیام</label>
<div class="controls">
@Html.TextAreaFor(model => model.Comment, new { @class = "span5", @readonly = "readonly", style = "width: 450px; height: 120px" })
</div>
</div>


<div class="control-group">
<label class="control-label span2">پاسخ</label>
<div class="controls">
<a href="@Url.Action("Compose", "Message")" ></a>
</div>
</div>





من می خوام برای صفحه ی نمایش پیامم یعنی جایی ک کاربر میره پیامشو میبینه یک گزینه پاسخ بذارم اما نمیدونم چجوری Ajaxi این کارو بکنم و اینکه چجوری ID فرستنده رو حفظ کنم ک ب همون بفرسته!؟؟
اینم ک گذاشتم کد نمایش پیاممه...