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

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

is possible to pass some data to a wpf started with Process.start?

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :WPF
is possible to pass some data to a wpf application started with     Process.start?

View Complete Post

More Related Resource Links

How to retrieve data from SqlDataSource and pass to a variable?


Hi there,

I have a page in my website where there is very little code-behind. I only have two lines of code in Page_Load() and the rest of the code is declarative ASP.NET code. I have a FormView control which uses a SqlDataSource to get some order information. The SqlDataSource calls a stored procedure called usp_GetOrderDetails, here's the code for the SqlDataSource:

    <asp:SqlDataSource ID="sdsFormOrderDetails" runat="server" 
ConnectionString="<%$ ConnectionStrings:ForexDB %>"
ProviderName="<%$ ConnectionStrings:ForexDB.ProviderName %>"
SelectCommand="usp_GetOrderDetails" SelectCommandType="StoredProcedure"
UpdateCommand="usp_UpdateOrder" UpdateCommandType="StoredProcedure"
<asp:ControlParameter Name="orderId" ControlID="grdOrders" PropertyName="SelectedDataKey.Value" />
<asp:ControlParameter Name="orderId" ControlID="frmOrderDetails" PropertyName="SelectedValue" />

Data Deployment: Streamline Your Database Setup Process with a Custom Installer


Database setup can be a tough and time-consuming process and sometimes fall victim to human error. Microsoft Installer or InstallShield can help, as can your own custom installer. In this article, the author tackles one approach to writing database installers and demonstrates the process with a working code sample.

Alek Davis

MSDN Magazine September 2004

Using Session to pass data between forms


In my app, I am displaying an Rss Feed, I have a button that takes the user to another form where they can select a them.  Upon selecting the theme, they are taken back to the original form. 

If the user has selected which theme they want to view then they click on the button to change theme, I need to pass the information about what rss feed they were viewing through session so that once they select the theme they want they are redirected back to the main page and the rss feed they were viewing should still be displayed.

Since I've already bound the data to the xmlDataSource and DataList I am trying the following:

Session.Add("CurrentRssFeed", XmlDataSource1.DataFile);

Session.Add("CurrentDataList", DataList1);

I'm not sure I am passing the data over correctly and I'm not sure how to specify it in the page_preinit.

Any ideas???

How to process data AFTER page is completely loaded for the user?


I have some logging that has to be done, which are some database update or inserts.

However this logging is of no importance to the user, so I only want to process the data/logs after the page is completed for the user.
As of now, if I process the data while the page is loading, I go from 1.4 to 2.0 speed (server side time processing of code), which is quite a bit comparing it is of no use to the user.

So I want this code only executed after that the page is complete.

I've been checking out Ajax, async pages etc, but the problem is it still gets executed before the page is rendered to the client, which means the client will have to wait longer then it is not being processed.

I've been checking out Threadpool.queueBackgroundWorker, however if I get it correct, this will still be executed before the page is shown to the user, as it has to complete before the prerender.

Then I thought about creating a new thread, and do the processing there, which would not have my page waiting to complete the data/logging.
However when I have 100 or 200 users loading pages at the same time, then that would mean I would be creating 200 threads on those loads, which I doubt will be good for performance. So if I want to solve this, I would have to create my own threadpool and only assign for example a max of 40 threads to it which can pr

Quick Note (Scenario): Getting Started with Data Access in SharePoint 2010

The goal of these exercises is to give you the steps that you need to access data from various sources by using web development tools and technologies such as SharePoint 2010 and Visual Studio 2010.

IE Process Start and Window Height

Hi, I'm working on a tool for cross-browser testing: the idea being that a WinForms app will open a range of URLs over a range of browsers, and save each out as a screenshot. I have a problem with Internet Explorer though - namely that the opened window thinks it's a lot larger than it actually is... Background: I've got some javascript/jQuery, that happily reads a parameter from a URL, and scrolls a page down - so for example http://mypage/?scroll=1 will show the top part of a web page, http://mypage/?scroll=2 shows the second part, and so forth. The scrolling mechanism uses $(window).height() and $(document).height() - both of which are standard javascript methods that work happily.   $(document).ready(function () { var windowHeight = $(window).height(); var documentHeight = $(document).height(); alert("Window Height: " + windowHeight + "px, Document Height: " + documentHeight + "px" ); });   If I open my url in IE normally, it picks up (for example) a window height of 880px - which is correct since my screen is 1050px high, minus a bit for the IE toolbars/furniture. In my WinForms application, I can open IE happily with one of the scrollable urls - namely   process.StartInfo.CreateNoWindow = false ; process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized; process.StartInfo.FileName = "iexpl

process.start with UseShellExecute = False

Hi Please help here im stuck with this issue where i am trying the fire the cmd.exe to perform a task but the cmd.exe file needs to be started with with admin rights and i wnt the file to be hidden and even if i set the process properties ProcessWindowStyle.Hidden. How can i run the process with admin right and also hide the window because the minute i set UseShellExecute = True and comment out the user name and password than it hides the window. From what i can gather is that once you set UseShellExecute = false the code does not hide the window. See my code example below and it would really help if some could show me how to start the processs with admin right and keep the window hidden. Dim myProcess As New Process ' Declare new instance of the process class myProcess.StartInfo.FileName = "cmd.exe" ' myProcess.StartInfo.Arguments = "My Arguments here" myProcess.StartInfo.UseShellExecute = False myProcess.StartInfo.Verb = "runas" myProcess.StartInfo.UserName = Username myProcess.StartInfo.Password = password myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden myProcess.Start() ' Start the process myProcess.WaitForExit() ' Wait for it to exit.

Process.Start - arguments length restriction to 2080 characters

Hi, I'm wondering why is there a limit to "The sum of the length of the arguments and the length of the full path to the process " to 2080? I see that the documentation says that a Win32Exception is thrown if this exceeds 2080 characters. Can someone please explain to me this limit? I'm trying to start a process and I have a lot of arguments to pass, and of course ... I exceed the limit of 2080.   Thanks, Ionut.

Pass Data between 2 WorkFlows

Hi, How do I pass data between 2 workflows. I am calling a workflow dynamically from main workflow using Invoke Method. And I am using OUT Argument for inner workflow to pass data to main workflow. But I am not receiving the data from inner workflow to main workflow.   Any idea?

Process Start

I have the following code: Private Sub StartCSVParse(ByVal CSVParse As String) Dim process As New Diagnostics.Process With process With .StartInfo .FileName = "ExcelConverter.exe" .Arguments = "" .WorkingDirectory = "C:\Program Files\Infrahealth Inc\CSVParser\" End With ' .Start() 'This Try is to catch if the application throws any kinds of errors' Try Catch Exc As Exception message2.Text = Exc.Message End Try End With End Sub and the rest of my code before this works, but this won't start the process referenced. The process will run on it's own as an executable. I've verified that the right permissions are in place to execute the program and it wont start. Can anyone offer any reason why it may not be working?Thank youDoug

String Data missing start from "+" When Export Data To Excel Using Gridview

Hi,I am exporting data from gridview to excel file.My problem is that for all the string which contain "+", the rest of data begining from it is missing in excel file.For example: PWE-WER+78, when exported it will become PWE-WER.Below is my code.                Response.ClearContent() Response.Buffer = True Response.AddHeader("Content-Disposition", "attachment;filename=" & "ExportedExcel.xls") Response.ContentType = "application/vnd.ms-excel" Response.Charset = "" lobjStringWriter = New StringWriter lobjHtmlWriter = New HtmlTextWriter(lobjStringWriter) dgdResult.RenderControl(lobjHtmlWriter) Response.Write(lobjStringWriter.ToString()) Response.End() I  have search through online but no solution.Does anyone has idea on this?

How to kill process my application has started

Hi,  I've got a windows forms application that opens instances of another application through a WebBrowser control. On exit / exception I want to make sure that 3rd party application closes.    The following code kills the app ok but I want to make sure it will only end the process if it was started by my application   string processName = "Plugin"; Process[] processes = Process.GetProcessesByName(processName); foreach (Process process in processes) { process.Kill(); } Does processes consider all processes or just those started by my application? On testing it seems to close all. Thanks, Ian

Calling SlSvcUtil with Process.Start()

Our application relies on SlSvcUtil (the equivalient of SvcUtil) to generate our WCF service client dynamically. It has always worked in the past but for some reason, when I call the command line to run this utility the application just stoped. The code is: Process process = new Process(); process.StartInfo.FileName = SvcUtilPath; process.StartInfo.Arguments = arguments; process.StartInfo.ErrorDialog = true; process.StartInfo.UseShellExecute = true; process.Start(); process.WaitForExit(); The variables: SvcUtilPath = C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Tools\SlSvcUtil.exe arguments = http://localhost/XivicServicesNPDev/SecurityService.svc /out:c:\GeneratedSourceXivicNPDev\WCFReference\Silverlight\\SilverlightSecurityService.cs  /ct:System.Collections.ObjectModel.ObservableCollection`1  /ser:Auto  /n:*,Adapt.WCF.Reference  /r:"c:\GeneratedSourceXivicNPDev\FrameworkBin\Silverlight\Adapt.Model.Common - Silverlight.dll" /r:"C:\Program Files\Microsoft Silverlight\4.0.50524.0\\System.Windows.dll" /r:"c:\GeneratedSourceXivicNPDev\FrameworkBin\\Silverlight\Adapt.Model.Security - Silverlight.dll" /r:"c:\GeneratedSourceXivicNPDev\FrameworkBin\\Silverlight\Adapt.Model.CodeGeneration - Silverlight.dll" /r:"c:\GeneratedSourceXivicNPDev\FrameworkBin\\Silverlight\Adapt.Model.DataTransformation - Silverlight.d

IS There is any way out to process only one partition of cube and data of other partition remain ava

HI ALL. Please let me know is there is any way out to process one partition only,while data of other partition remain available in the cube with the help of SSIS

can a Workflow access a stored procedure and pass the parameters from the list data to the stored pr

The reason that I would like to consider this functionailty is because my table architecture is complicated and I do not want to modify my master table to accept all of this data where some of the data should be normalized into sub tables.  Has anyone see evidence of the stored-procedure parm approach?  Is this best accomplished through VS 2010 or can I do it through SPD? Thanks

Process Data VS Incremental Process

HI All. what is the difference between Process Data VS Incremental Process.   Regards Amit

How to pass the file path in EXEC of Stored Proc for getting IIS Logfile data

Hello,                  I need to get IIS Logfile data from Stored Proc. How to do this. I am using Bulk Insert Method in my stored Proc When I execute the stored proc I am getting an error that  Incorrect syntax near 'C:\WINDOWS\system32\Logfiles\W3SVC1\ex100802.log'.     Below is the code.                 Create  PROCEDURE  spWebLog @path varchar(300) AS begin exec('BULK INSERT Weblog from''' + @path + ''')  end go Declare   @SQL Varchar(100 ) Set    @SQL= 'C:\WINDOWS\system32\Logfiles\W3SVC1\ex100802.log' exec   spWebLog @SQL    
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