Posts

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.

c# - How to handle NullReferenceException in a foreach? -

foreach (string s in myfield.getchilds()) { if (s == null) //handle null else //handle normal value } when run program nullreferenceexception because getchilds may return null. how can make program continue anyway , handle exception? can't handle outside of foreach, can't explain why because take time (and sure guys busy :p). ideas? i tryed way: foreach (string s in myfield.getchilds() ?? new arraylist(1)) { if (s == null) //handle null else //handle normal value } but not work, program jump @ end of foreach want enter foreach instead! one way (though not best way) is: foreach (string s in myfield.getchilds() ?? new string[] { null }) or foreach (string s in myfield.getchilds() ?? new arraylist { null }) the reason new arraylist(1) doesn't work creates list has capacity hold 1 element, still empty. new string[] { null } creates string array single element null, appear want....

Extjs: Reuse the same grid in TabPanel -

in extjs application have grid , tabs line on it. content of grid depends on selected tab. tabs has jan-feb-mar-... values. clicking of tab reload grid's store question: possible avoid duplicating of 12 grid components in favor have 1 shared instance? thanks disclaimer: searching @ sencha's forum, google, stackoverflow not successful :( it is, require more effort worth. create prototype component, can create new instances quickly.

indexing - SQlite Index on 2 number fields? -

i have table access 2 int fields time want index help. there no writes ever. int fields not unique. what optimal index? table myinta myintb sometextvalue the queries this: select sometextvalue mytable myinta=1 , myintb=3 you add index on (myinta, myintb) . create index your_index_name on mytable (myinta, myintb); note: might preferable make pair of columns primary key if pair of columns (when considered together) contains distinct values , there isn't obvious choice primary key. for example, if table contains data this: myinta myintb 1 1 1 2 2 1 2 2 here both myinta , myintb when considered separately not unique neither of these columns individually used primary key. however, pair (myinta, myintb) is unique, pair of columns used primary key.

sharepoint 2010 - Deploying wsp from MSI installer -

i deploy sharepoint 2010 solution package (wsp) using msi (or other user friendly form of installer). i know can create custom action , deploy using sharepoint object model, don't think that's way go. what way this? there upcoming project on it, read here: http://sharepointinstaller.codeplex.com/wikipage?title=specificationv2&referringtitle=home currently, best way use msi customaction. instead of object model, use powershell script deploy wsp. cleaner code. http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/12/02/adding-and-deploying-solutions-with-powershell-in-sharepoint-2010.aspx

c# - How can I make the background color of a node in a TreeView goes all the way out to the right edge? -

how can make background color of node in treeview goes way out right edge? background i have treeview nodes have children gray. leaf nodes have icon descriptive text. it's easy fix. unfortunately it'll require pretty code since you'll have re-template treeviewitem. treeviewitem's template looks this <controltemplate targettype="{x:type treeviewitem}"> <grid> <grid.columndefinitions> <!-- expand/collapse togglebutton --> <columndefinition minwidth="19" width="auto"/> <!-- treeviewitem --> <columndefinition width="auto"/> <!-- children --> <columndefinition width="*"/> </grid.columndefinitions> <grid.rowdefinitions> <rowdefinition height="auto"/> <rowdefinition/> </grid.rowdefinitions...

css - Nested Div hover question -

i have 3 html div this: <div id="maindiv"> <div id="nesteddiv1"></div> <div id="nesteddiv2"></div> </div> i want when hover on maindiv or nesteddiv1 , set color 1 maindiv , color 2 nesteddiv2 , when hover on nesteddiv2 change backgroundcolor of nesteddiv2 , maindiv. i prefer css, know javascript way. thanks mazdak there no way, in css, target element using selector includes 1 of descendents. while first half trivial achieve, second half impossible. use javascript if matters much.

Magento - Select some customer infos -

for purpose of module began realize, want make select query gives me address, name , surname of 1 or more clients. i bit lost in database magento, help! you can echo out each select magento getselect() method. for 1 client echo mage::getmodel('customer/customer')->load('id')->getselect(); or whole collection echo mage::getmodel('customer/customer')->getcollection()->getselect();