.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

C++ at Work: Unreferenced Parameters, Adding Task Bar Commands, and More

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

More Related Resource Links

C++ at Work: Web Version Checking, Adding Sound to an App


This month: CWebVersion revisited using HTTP instead of FTP, and adding sounds to an MFC-based app.

Paul DiLascia

MSDN Magazine May 2006

Optional named parameters work pretty well

Rob has found a use for dynamic: http://blog.wekeroad.com/2010/08/06/flexible-parameters-with-csharp Yay! Let's celebrate! Well, I was a little puzzled because I don't think it quite adds up in the specific example he chose (although please see no aggressiveness here: Rob's a friend; peace!). The idea is to have the same flexibility that a dynamic language can offer in terms of evolution of an API. Here's his original Ruby example: def my_method(args)   thing_one = args["thing1"]   thing_two = args["thing2"] end my_method :thing1 => "value", :thing2 = Time.now The idea, which is quite common in dynamic languages, is that instead of passing a list of predetermined parameters in a specific order, you...(read more)

Will console commands be displayed when run as a task?

I have a C# console application. When it runs it puts comments out to the command line using theConsole.WriteLine() command. Now the console application will be set up on a server to run as ascheduled task. Should I turn off the Console.Writeline statements when in production? Since theapplication runs as a scheduled task, would the console commands even be displayed?

jquery ajax call does not work after adding routes

Hi.   I've added routes to my asp.net 4 website so that, for example the page: "~/Main/About/Careers.aspx"  is mapped to the url:  http://localhost/mysite/careers/   I'm using jquery to make an ajax call and it simply does not work after I've added the routing, I used the following code, and it remains stuck on the spinner image:$.ajax({ type: "POST", url: "Careers.aspx/SubmitApplication", data: "{" + paramList + "}", contentType: "application/json; charset=utf-8", dataType: "json", beforeSend: function () { $(".applySpinner").show() }, success: function (msg) { $(".applySpinner").hide(); // Replace the div's content with the page method's return. if (msg.d == "") { $(".applySuccess").hide(); $(".applyFailure").show(); return; } else $(".applyFailure").hide(); $(".sentTime").text(msg.d); $(".applySuccess").fadeIn(1000); } }); Thanks.  

Why search do not work if I leave only 1-2 parameters to the Advanced Search Box?

I have add advanced search box to the SharePoint 2010 Server Enterprise portal. Default configuration works fine and I can also uncheck few parameters, but problem exists if only 1-3 parameters are checked and other parameters are unchecked. I would like to leave only "All of these words" and "Show Exact phrase" and remove the rest of parameters. However if I uncheck following, the search do nothing. SharePoint refresh the site, but do nothing. -Uncheck: Show "exact phrase" search box -Uncheck:Show "none of these words" search box -Uncheck:Show the scope picker -Uncheck:Etc.Kenny_I

sharepoint designer work-flow, task attachment enable

Hi I want to creat a sharepoint approval work-flow, which is sequencial so i am devloping it using sharepoint designer, but my chalange is that when it create a task for first approvar it should have an attachment option with task so when first approvar approve and want to attach anything he/she can attach refrence, then it should go to second approval and he also able to check or make additional attachment and so on can any one let me know is it possible and if then how thanks in advance

Send multiple parameters SSIS execute process task



We are using Execute Process Task in SSIS package to execute a batch file to house keep the generated flat files which are older than a week from the archive folder.

The same batch file is used to delete the some temp files generated in the process.

As the Archive folder and temp folder paths are configurable, we are trying to pass the folder paths as parameters to batch file.

I used Expressions tab of Execute process Task Editor to map the variable to Arguments property. This is working fine. but I need to pass one more variable as an Argument.

Can some one help me how to achieve this. Thanks in advance.


Sreekanth ABS



Can't make parameterized query work in data flow task


I have an OLE DB source in a data flow task.  The connection is pointing to a SQL Server 2008 instance.  My SQL works fine when I click the preview button.  Now I need to make it parameterized by adding a question mark in my where clause.  After doing so & clicking the Parameters button, I get the error described in this post .  When I try to do what's described therein to correct the problem (click the "build query" button), I get the error "The PIVOT SQL construct or statement is not supported."

I can't make this query an expression; it's simply too complex to maintain that way (besides, just pasting it into an expression builder window and trying to evaluate as is doesn't work - can't evaluate).

So the question is, how do I parameterize a query?  And why does SQL here work so radically differently from SQL in an execute SQL task?

Adding parameters via URL to a SSRS report stored in Sharpeoint 2007

I am trying to pass parameter to a SSRS Report via URL stored in Sharepoint 2007 (integrated mode) but that doesn't seems to work. The report opens without the parameters taken into account. Any sggestions on how to pass parameters to SSRSreport on sharpeoint?..Thanks for your help...

Does SSIS Web Service Task work with WCF?


From what I am reading, SSIS Web Service Task does not work with WCF, even though SSIS is 5 years old and WCF is 3. Did they fix it in 2008? R2? Will they ever?

And if it doesn't work, can someone give me pointers on setting up a Script Component to feed some variables to the WCF as inputs?

Thanks in advance.

Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.

Passing Parameters to Execute SQL task which is inside a For Loop Container



I have a requirement.

In this I will get a value of 50 ids from one table.

I have an sp which will take ids as input parameter and insert values into another table.

My Problem is I am having a for loop container with me and inside that i have execute sql task in which I have stored procedure.

How can i map the id parameter to the execute sql task variable whichi is inside a forloop.




Thanks, A2H

Adding exception table to incremental Load with SSIS Lookup task and conditional split



I have built an incremental load ETL Process to load some flat files with an SSIS Lookup and Conditional Split. I only have one path in the conditional split and that is for New Records.

I have two questions:

1.       For the new records path, I have to check to see if a record exists and I don’t have a single key that is unique, therefore, I have to use a multiple keys to make the record unique.


Below is what I have put in the conditional transformation editor for my first output condition:


Execute SQL Task - passing parameters


I have 2 Execute SQL tasks - No data flow task.

On Execute SQL task 1

I have query to pull firstname, lastname from contact table

select firstname, lastname FROM [AdventureWorks].[Person].[Contact]

On Execute SQL task 2

I want to insert those values to newly created table using parameters.

( i have 2 variables declared at package level as firstname, lastname)

insert into cnt(firstname,lastname) values (?,?)


My question

1. Is it possible to pass values multiple times (or values) using variables.

2. What parameter Direction type & Result Set I need to use in Exec SQL task 1 and 2.


SQL Execution Error, Specified type is not registered on the target, when adding DateTime parameters


I have SQLServer 2008r2 installed on a Windows Server 2008 R2 machine.  I'm trying to build a report using SSRS - and as soon as I try to add some DateTime parameters to the query and execute, I get

SQL Execution Error.

Executed SQL Statement:  blah blah Error

Source: System.Data

Error Message: Specified type is not registered on the target server.System.DateTime, mscorlig, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089.

I tried taking the suggestion from another thread and installing the .NET Framework 2.0 from: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=B44A0000-ACF8-4FA1-AFFB-40E78D788B00, but I received the message that it is already installed.  How do I get past this error?

How does FTP Task work ?

I have a FTP Task in SSIS Package which send files to FTP. If disk space gets full during FTP what happens ? Can it just send partial data of the file and fail OR it doesnt send the file and fails ? I was just thinking about the issue if just partial data of a file gets into FTP.

Adding an existing task to a SharePoint Workflow

I have a very unique issue that I cannot find any answers to. I am desigining a workflow to assign and monitor multiple task lists based on a folder content type. Since you cannot instantiate a workflow from a folder content type, I have another process that programatically creates a Task associated with the document library folder. I want to have a workflow kick off upon creation of the task. However, there is no way within Workflow to correlate task realated activities with a task that already exists. The only way that I've been able to get this to work is to actually create a task within the workflow which will not work for me.

Is there any way to do this in workflow, or will I simply have to create a bunch of code activites to accomplish what I need. If that is the case then there is no point in even using workflow...


Report with Multiple Valued MDX Parameters dont work if they contain special characters


I have a parameter "Region" with multiple values allowed. Its Dataset is filled with the following query:

{ ([DimIBB].[Region].[Region].ALLMEMBERS ) },
[DimIBB].[Region].CurrentMember.Name <> "Unknown"
FROM [Buchhaltung]

Then I have a Dataset with Query using the above Parameter as "@DimIBBRegion" , which I use i my report:


The displayed text and the values for Region (first query above) are : Mitte, Nord, West, Bayern-Nord, Bayern-Süd, keiner Region zugeordnet

There are no problems for Mitte, Nord, West I can select any combination of them and everthing work. But because o

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend