TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aniruddha Nargund
NA
113
653
how to get delete and edit id differently in same Action
Dec 11 2015 7:43 AM
i have grid in View like this
<tr>
<td>@Html.ActionLink("EDIT", "InsertRequest", new { strRequestId = Model.GetAllRequests.Tables[0].Rows[i]["RequestId"].ToString() })</td>
<td>@Html.ActionLink("DELETE", "InsertRequest", new { strRequestId = Model.GetAllRequests.Tables[0].Rows[i]["RequestId"].ToString() })</td>
<td>
@RequestId
</td>
</tr>
now in controller i have actionresult like this
public ActionResult InsertRequest(RequestModel RM, string strRequestId)
{
//if(ModelState.IsValid)
//{
if(strRequestId != "" || strRequestId != null)
{
RM.HubList.Add(new SelectListItem { Value = "BLR", Text = "BLR" });
DataAccessLayer.DBData objDB = new DataAccessLayer.DBData();
string strSelected = Request.Form["strSelectedHub"].ToString();
string strRes = objDB.InsertData(RM);
ViewData["InSertResult"] = strRes;
ModelState.Clear();
return View(RM);
}
}
now i need to get differnetiate between edit and delete and display the same view .. how i can do it?
Reply
Answers (
4
)
asp.net question and asnswer program
Please Help.Question and answer C# .net program.