http://localhost:10649/Home/GeneratePDF?UserID=113&FullName=dungar&Email=ram.dungar08%40gmail.com&Subject=test&Gender=male&Address=nagaur&City=nagaur&State=raj&Country=india&MobileNo=8130623911&CheckinDate=12%2F20%2F2014%2000%3A00%3A00&CheckOutDate=12%2F21%2F2014%2000%3A00%3A00&NoofRoom=2&Status=Booked
Can anyone tell me how to prevent displaying data in url in mvc 4 ??? i just want to show only in url http://localhost:10649/Home/GeneratePDF like this but its showing all other data . so please help me out on this matter ?? i would appreciate it.
Thanking you in advance .
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 21, 2014, 6:44 PM EST
use FormMethod.Post in @using (Html.BeginForm(.....){}
and Decorate the controller action method with [HttpPost]
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 21, 2014, 6:54 PM EST
ram dungarRank #7,881 · 232 reputationPosted Dec 21, 2014, 6:54 PM EST
i tried [HttpPost] but don't work, still getting some url. do you anything else to suggest ???
Thanks
ram dungarRank #7,881 · 232 reputationPosted Dec 21, 2014, 7:05 PM EST
@model bootstrapPractice.Booking
GeneratePDF
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 21, 2014, 7:21 PM EST
@model bootstrapPractice.Booking
GeneratePDF
ram dungarRank #7,881 · 232 reputationPosted Dec 21, 2014, 7:33 PM EST
sorry to tell you that its getting error, even i solved the error but getting same url.
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 21, 2014, 7:38 PM EST
ram dungarRank #7,881 · 232 reputationPosted Dec 21, 2014, 7:45 PM EST
public ActionResult GeneratePDF(Booking bm)
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 21, 2014, 7:51 PM EST
by clicking this form will be posted back using post
ram dungarRank #7,881 · 232 reputationPosted Dec 21, 2014, 8:11 PM EST
sorry to tell you that its not working.
Thanks
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Dec 21, 2014, 8:31 PM EST
ram dungarRank #7,881 · 232 reputationPosted Dec 21, 2014, 8:43 PM EST
its not working.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts