Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

spring - Showing the URL of the view in the address bar, instead of the one of the action -


@requestmapping(value = "updatepatient", method = requestmethod.post) public modelandview postupdatepatientbyid(         @modelattribute("patient") patientform patientform,         httpsession session) {     long id = (long) session.getattribute("refid");     if (id != 0 || id != null) {         patient patient1 = hospitalpatienthelper                 .getpatientfrom_patientform(patientform);         patientservice.updatepatient(patient1, id);         patientservice patientservice) {     patient patient = patientservice.getpatientbyid(id);     modelandview mv;     patientform patientform = hospitalpatienthelper             .getpatientform_frompatient(patient);     list<weight> weights = patientservice.viewlast10recordedweight(patient);     weighttable weighttable = new weighttable();     list<weightsummarytable> summaryweights = weighttable.summary(weights,             patient.getheight());     mv = new modelandview("patient1/patientdetail");     mv.addobject("patient", patientform);     mv.addobject("summaries", summaryweights);     mv.addobject("lastweight", summaryweights.get(0).getweight());     mv.addobject("bmi", summaryweights.get(0).getbmi());     return mv;     } else {         return new modelandview("patient1/patientdetail");     }  } 

the page shown sucessfully, url dosn't change, means url not showing address www.url.com/patient1/patientdetail.htm

and want returning view address should shown in url too.

please me

use either

new modelandview(new redirectview(patient1/patientdetail)). 

or

redirect:patient1/patientdetail 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -