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.

vb.net - TabControl.SelectedIndex being changed, but SelectedIndexChanged even not firing -


all,

i have tabcontrol in application started behaving strangely. background...

this program converted vb6 vb .net 2008, , used refer forms using class names. in other words, might have form class called frmfoo. in code program might see:

frmfoo.show() 

or

frmfoo.userdefinedproperty = true 

during recent changes, created variables represent instances of forms these:

public myform frmfoo  myform = new frmfoo myform.show() 

in doing so, removed code form's load event handler , put in form's constructor.

when form loads, or when document loaded , should influence tabcontrol's selected index, following not fire selectedindexchanged event.

myform.tbsform.selectedindex = valuereadfromfile 

...or...

myform.tbsform.tabs(valuereadfromfile).select 

sorry wordy, there's more. if open form , @ tabcontrol verify it's been set properly, works it's supposed to. misbehaving tabcontrol contained within tabcontrol, have click parent tabcontrol see it. if can see it, , run test, test works. if can't see it, , run test, first test run not fire event. ...paging dr. heisenberg...

it's if control has initialized first changing value or making visible onscreen...i'm totally lost on one. it's unusual behavior i've ever seen. , worked before began using variables represent forms , placed load event code form constructors.

can help, or @ least put me out of misery? sh

-------------------------------------------------------------- edit #2
performed test after having attempted eliminate of variability in behavior. wanted confirm previously-stated behavior.

i opened program , read file. file contained value should have triggered event handler. without making control visible, can change selectedindex property of tab control without event firing.

i closed program down again, , reopened it. time, selected parent tab allowed child tab (the 1 event i'm concerned with) become visible. selected different tab in parent control, meaning child control no longer visible. when opened same file before, fired event.

i'm tempted implement flag confirms control has been repainted or whether parent tab has been displayed. may have fire event in code if flag isn't set.

i want reiterate worked when program referred forms class names , of arrangement of controls on forms done in load event. program creates variables , arrangement of controls done in form's constructor. i'm sure has problem i'm having, can't understand how. wisdom share?

myform.tbsform.selectedindexchanged = valuereadfromfile 

doesn't make lot of sense. tha trying assign handler selectedindexchanged event? or valuereadfromfile name of tab?

what you're saying have 2 tab controls, say, , b. tab control b contained within tab of a, , unless has tab page selected contains tab control b, selectedindexchanged event of b not fire if change tab programatically?

in different ways have tried select tab within child tab control, , when code being executed?


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 -