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.

android - The constructor Intent(new View.OnClickListener(){}, Class<DrinksTwitter>) is undefined -


i getting following error:

the constructor intent(new view.onclicklistener(){},                         class<drinkstwitter>) undefined 

in following code snippet:

@override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.main);      // edittext , button references     etusername = (edittext)findviewbyid(r.id.username);     etpassword = (edittext)findviewbyid(r.id.password);     btnlogin = (button)findviewbyid(r.id.login_button);     btnsignup = (button)findviewbyid(r.id.signup_button);     lblresult = (textview)findviewbyid(r.id.result);      // set click listener     btnlogin.setonclicklistener(new onclicklistener() {         @override         public void onclick(view v) {             // check login             string username = etusername.gettext().tostring();             string password = etpassword.gettext().tostring();               if(username.equals("test") && password.equals("test")){                 final intent = new intent(this, drinkstwitter.class);  //error on line                 startactivity(i);                 // lblresult.settext("login successful.");                 } else {                 lblresult.settext("invalid username or password.");             }         }     });      final intent k = new intent(screen2.this, signup.class);      btnsignup.setonclicklistener(new onclicklistener() {          public void onclick(view v) {              startactivity(k);         }     });  } 

what doing wrong line:

final intent = new intent(this, drinkstwitter.class);  

change

final intent = new intent(this, drinkstwitter.class) 

to

final intent = new intent(screen2.this, drinkstwitter.class) 

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 -