|
A quick bit of googling revealed this article: How to redirect Standard Input/Output of an application[^]
It looks like you'll need to amend your code in a similare way to below:
Process start = null;
start = Process.Start(new ProcessStartInfo()
{
FileName = @"C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe",
Arguments = string.Format("-pef connectionStrings {0}", webConfiguraitonFilePath),
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
RedirectStandardError = true,
RedirectStandardOutput = true
});
start.Start();
StreamReader outputReader = process.StandardOutput;
StreamReader errorReader = process.StandardError;
|
|
|
|
|
Hi Martin,
Many thanks for the reply, I will definitely try it out.
Kind regards,
|
|
|
|
|
Just remeber to set the UseShellExecute property to false.
Process start = null;
start = Process.Start(new ProcessStartInfo()
{
FileName = @"C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe",
Arguments = string.Format("-pef connectionStrings {0}", webConfiguraitonFilePath),
CreateNoWindow = true,
UseShellExecute = false,
WindowStyle = ProcessWindowStyle.Hidden,
RedirectStandardError = true,
RedirectStandardOutput = true
});
start.Start();
StreamReader outputReader = process.StandardOutput;
StreamReader errorReader = process.StandardError;
Thanks again.
Kind regards,
|
|
|
|
|
|
Hi,
How to draw semi transparent boxes(rectangles) in richtextbox control
Any help would be greatful.
|
|
|
|
|
Hello, Hope this is the right forum.
I'm working with web application (C# and asp.net) and I was wonder what are the disadvantages of start working with winforms (clickonce) instead of web applications?
I didn't found any new discusses about that.
Are there any things I can do with web forums that I can't do with winforms?
Thanks in advance,
Roy.
(I u think there is a beeter form for this - please tall me).
|
|
|
|
|
|
Hi,
I saw this article but it seems kind of old (internet explorer 6?!).
I thought that may be there are new differences with the advanced ajax and clickonce today.
Thanks,
Roy.
|
|
|
|
|
It depends on what the app does and/or should do.
Also if you want the app to be publicy available the go for web ASP/SileverLight/whatever suits your
needs and or style.
If the main reson of the app is to introduce data and some small reports than I would recomend
winforms/WPF/localapps/desktop apps simply because they are significantly more responsive.
Another option to consider is:
- is the app for internal enterprise/plant/firm usage?
- should it be available outside usage? If yes the whole app or just some small reports for management?
There's no absolute answer.
|
|
|
|
|
Thanks for the reply!
I will take it into consideration.
Roy.
|
|
|
|
|
There are several elements you have to consider when regarding web vs. winform.
First what does the application do? Do you require rich content with complex process (like a language processor) then you need to deploy a winform application.
If you don't have need for a rich application and can live with simpler controls, then web is the way to go.
If you need a rich experience with a choice between web and out-of-web experiences then you should consider Silverlight. SilverLight presents itself as a web application but can also be built to be an out-of-browser application with a development process closer to that of a winform application.
For myself, I've always been a backend...service based...winform developer. SilverLight gives me the development experience closer to a winform application which is much more comfortable for me than web is. (But stay aware of the fact that you must make service calls asynchronously which adds quite a depth of complexity in the design process.
|
|
|
|
|
hi,
i want to host a control in a datagrid cell(single cell) not the entire column.is there any easy way for doing this?
|
|
|
|
|
Check out this msdn link[^].
|
|
|
|
|
this is for entire column i think i need to add a control to only one cell i.e first cell of grid.
|
|
|
|
|
I have 2 questions.....
1) Are you binding your grid dynamically or is it fix and records won't change?
2) Why you need control only in one cell, is there any specific purpose?
|
|
|
|
|
i made a project for my final year that has a robot which is controlled via Wiimote.
now i want to add a surveillance camera to it...
so i just thought if i can use my mobile phone (mine is motorola A1200) or any other mobile phone as a webcam which will send videos or images to the C# appl. through bluetooth...
i have found applications which access the webcam in C# but couldnt find anything related to bluetooth cameras
if someone can post some links or codes then it would be really helpful
thanks in advance...
|
|
|
|
|
Hi all
1.I would like to copy(programmactically) some tables(Mysql DB) from server into local machine(MS Access) when a user login is successful.
2.After a user has done something on local database, (eg. update, insert etc), the changes will update back the sever database.
Is there any idea pls? Could anybody help me?
Thanks in advance.
Kyi Kyi
|
|
|
|
|
Are the client and server on the same network? If so you can connect directly to the server from your app and transfer the data. Otherwise you'll need a web service to access the server data
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thank you very much. I'll try.
|
|
|
|
|
1.Get the DataTable from the MYSQL SERVER. and then insert the data to the MS Access.
2.compare the difference of data between MYSQL SERVER and MS ACCESS and then update the changes back to MYSQL SERVER.
This web site is useful for you about the connection string.
http://connectionstrings.com/[^]
|
|
|
|
|
thanks yu-jian
|
|
|
|
|
hi i'm having hard time on how to display two column values in combox display member..like custID and custName...any sample code plz help
|
|
|
|
|
Hi,
Not sure how you would do it using the .NET toolkit (ComboBox), but if you make use of the control toolkit from DevExpress (which has 60 free controls), you can make use of their LookUpEdit control, which has this type of functionality. Here is an example if you are interested: LookUpEdit Control[^]
Kind regards,
|
|
|
|
|
Its quite simple actually :
DataTable dt = new DataTable();
dt.Columns.Add("ID");
dt.Columns.Add("Name");
while(reader.Read())
{
DataRow dr = dt.NewRow();
dr["ID"] = reader.GetValue(0);
dr["Name"] = reader.GetValue(0) + reader.GetValue(1);
dt.Rows.Add(dr);
}
combobox.DataSource = dt;
combobox.DataBind();
Hope this helps you.
|
|
|
|
|
Hi,
I develop a c#smart device application.
I create a Form MenuPrincipalusing listview tool.My listview contains 3 items:stock,Information,Quit.I wanna program these 3 items:stock to go to the Form Stock,information to go to the Form Information,and quit to close the application(the emulator in my case because i work with c# smart device)
How can i program this?This code doesn't work for me:
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{ListView lv = (ListView)sender;
ListViewItem item = new listviewitem();
if (item != null)
{
switch (item.Text)
{
case "Stock":
ShowStockForm();
break;
case "Information":
ShowInfoForm();
break;
case "Quit":
QuitApplication();
break;
}
}
}
private void QuitApplication()
{
Application.Exit();
}
private void ShowInfoForm()
{
InfoForm form = new InfoForm();
form.ShowDialog();
}
private void ShowStockForm()
{
StockForm form = new StockForm();
form.ShowDialog();
}
}
Thanks a lot for u contribution
|
|
|
|