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 programmatically add a custom component to Visual Studio toolbox? -


i creating installer custom ssis component have written. add custom component automatically, rather asking user manually add it.

i'm trying this code:

public void addtoolboxitem(string toolboxtabname, string toolboxitemname, string toolboxitempath) {   type dtereference;   envdte.toolbox toolbox;   envdte80.toolboxitem2 addedtoolboxitem;    // reference visual studio development environment.   dtereference = type.gettypefromprogid("visualstudio.dte.9.0");    if(dtereference != null) {     // reference toolbox of development environment.     envdte80.dte2 dte = (envdte80.dte2)activator.createinstance(dtereference);     toolbox = (envdte.toolbox)dte.windows.item("{b1e99781-ab81-11d0-b683-00aa00a3ee26}").object;      // loop through tab pages find toolbox tab page specified     // in toolboxtabname parameter.     foreach (envdte80.toolboxtab2 toolboxtab in toolbox.toolboxtabs) {        // right toolbox?       if(string.compare(toolboxtab.name, toolboxtabname, true) == 0) {          // first check if component not in toolbox:         bool found = false;         foreach(envdte80.toolboxitem2 toolboxitem in toolboxtab.toolboxitems) {           if (string.compare(toolboxitem.name, toolboxitemname, true) == 0) {             found = true;             break;           }         }          // toolbox item not in toolbox tab, add it:         if (!found) {           addedtoolboxitem = (envdte80.toolboxitem2)toolboxtab.toolboxitems.add(             toolboxitemname,             toolboxitempath,             envdte.vstoolboxitemformat.vstoolboxitemformatdotnetcomponent);         }         break;       }     }   } } 

i can reference "data flow transformations" toolbox tab, adding item fails without exception or error.

i call function parameters:

  • toolboxtabname = "data flow transformations"
  • toolboxitemname = "special test component"
  • toolboxitempath = "c:\program files\microsoft sql server\100\dts\pipelinecomponents\mdtest.dll"

as sanity check, tried using vstoolboxitemformatdotnetcomponent enumeration add()'s third parameter. causes add return valid object (ie, success), new item not appear on tool box. suspect there sort of 'save' operation may necessary (even if add() work properly).

is there way programmatically add ssis component toolbox?

same question can found in msdn forums , has been answered there mvp, moderator. pasting link answer provided in msdn forums others stumbling on question can know answer is.

programmatically add ssis component toolbox (social.msdn.microsoft.com)


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 -