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.

.net - Couple of VB.Net lines in C# -


i converting project vb.net, , have few lines unable convert propperly.

system.runtime.caching.memorycache.default(me.name)

in line, understand "me.name" has "this.name", error "non-invocable member 'system.runtime.caching.memorycache.default' cannot used method.".

i have correctly added system.runtime.caching references

also return new string[];. have no idea how convert this.

thanks in advance,
rené

it appears want call indexer (sometimes called item property). c# uses square-brackets [] purpose.

system.runtime.caching.memorycache.default[this.name] 

i suggest 2 other changes:

  1. if there's no ambiguity, can leave out this.
  2. with appropriate using directive (using system.runtime.caching;), type doesn't have qualified.

 memorycache.default[name]  

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 -