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.

javascript - modifying text of a div using dojo -


i have dojo widget.for widget have 2 files a.js , a.html.now inside a.html have like

<div id ="xyz" dojoattachpoint="xyz"> </div>   

the above line 1 line inside widget template , normal html div

now in a.js make asynchronous call server.in callback function of remote method want modify text of span xyz.i tryed following 3 ways, none of them working.

1) dojo.byid("xyz").innerhtml = "some text"
2) this.xyz.innerhtml ="some text"

3)

 var mywidget = dijit.byid("pack1.abc.widget.widgetname_id");             mywidget.xyz.innerhtml ="some text" 

none of above approach works.

when use approach 1 in other functions of a.js(non callback functions) works fine.

you cannot hardcode id of widget in it's template. id has identify instance of widget-type uniquely, has given on creation.

you can example like, programmatic in js:

var mya = new mywidgets.a({}); mya.startup(); mya.xyz.innerhtml = "some text" 

or declaratively in html:

<div data-dojo-type="mywidgets.a" data-dojo-props="id:'mya'"></div> 

and js:

dijit.byid("mya").xyz.innerhtml = "some text"; 

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 -