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.

asp.net - Disabled all the records book button in gridview1 whose name column values is sumit? -


alt text

i have textbox1 default text sumit , gridview records , button field in each row ..

on page load event

i want if textbox1 text sumit .... records in gridview1 name column values sumit .... rows book button disabled , rest of remain in enableed form ...

i m using visual studio 2008 vb

is coding right : ?

protected sub gridview1_databound(byval sender object, byval e system.eventargs) handles gridview1.databound         each myrow gridviewrow in gridview1.rows             'find checkbox             dim lab1 label = directcast(myrow.findcontrol("label1"), label)             if lab1.text = "sumit"                 'find delete linkbutton , hide                 dim deletebutton button = directcast(myrow.findcontrol("button1"), button)                 deletebutton.enabled = false             end if         next     end sub 

but coding doesn't disabled button .... in rows name field sumit

in grid view item data bound eventhandler, set button.enabled = false if "name" in dataitem sumit.


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 -