|
Hi I have a web application where a user downloads a file(eg word doc) from a db, makes changes on the file. My question is, how do I get the edited file reuploaded into the db. Filename left intact.
|
|
|
|
|
You need to provide a file browser control ( they need to browse to the file and select it, then click on a button to upload ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian. Thanks for your response. I'm talking about files that have previously been uploaded.
To clarify myself, the file is retrieved from the db, and written using the ffg line of code:
Response.Clear();
Response.ContentType = FILE_TYPE;
Response.OutputStream.Write(FILE_IMAGE,0,FILE_IMAGE.Length);
Response.AddHeader("Content-Disposition", "attachment;filename=" + FILE_NAME);
Response.End();
My question is, once the user makes changes to the displayed file, how do you reload the edited file into the db?
|
|
|
|
|
Even though the file comes from you, unless the user requests the file to be uploaded, I know of no way for IE to send the file back up again, even though it is running Word in the browser.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a listview with resizable columns that may potentially be wide enough to require a horizontal scrollbar. When I periodically refresh the contents of the lv it's position is always reset with the scrollbar shifted to show the leftmost part of the list. I want to keep the scrollbar position where it is, so that if the user is looking at items at the extreme right of the list they won't have to move the scrollbar after the update. Looking through the properties of the listview class I didn't see anyway to access this value.
|
|
|
|
|
Can anyone tell me either
a) how to find the user of a process
or, failing that
b) how to find the currently logged in user
with .NET1.1 under Windows 98 without WMI.
Dave
|
|
|
|
|
|
Argh - yes. However, that returns the user that is running the current process, not a specific process from the processes list. I suppose, thinking about it, it's probably the same thing under Windows 98, as there are no services so presumably no "system" users, and no fast user switching, so all processes must be run by the same user.
Also, I had very odd results with Environment.UserName - if I didn't set up any users on a new W98 installation then Environment.UserName returned "User" which must be some sort of default. However, I then set up a real user. Then, when I logged in, I hit Cancel on the login dialogue. Now, strangely, Environment.UserName returns blank. Go figure, as they say. I suppose W98 just doesn't handle users properly and there it is.
Nevertheless, thanks for getting back to me.
Dave
|
|
|
|
|
How to find file in hard disk?
|
|
|
|
|
Directory.GetFiles(directoryToSearch, fileName) where fileName can include wildcards
Ed
|
|
|
|
|
I have a simple application that takes a folder path and open in the windows explorer.
Here is the code i use
Process p = new Process();
p.StartInfo.FileName = "explorer.exe";
p.StartInfo.Arguments = strFilePath;
p.Start();
The problem is that when the filepath contains spaces it works just fine on my xp machine but on my clients machine which use windows 2000 the application fthrows the exception filenotfound.
I would like to know why it works on xp and doesn't on windows 2000
|
|
|
|
|
try by this
...
p.StartInfo.FileName = "iexplorer.exe";
...
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
Have you tried wrapping the path with embedded quotes.
"\"path with spaces\myapp.exe\""
-- modified at 11:04 Thursday 16th March, 2006
More generally, paste the exact string you send to the process class into the run dialog and see what happens there.
|
|
|
|
|
hi,
i am using DrawString method to display text in my Smartphone application when form is painted. i have added a method to the Paint event handler for this:
this.Paint += new PaintEventHandler(DrawMainPage);
when i get new data i have to repaint the form to inorder to show new data.
but when i call myform.invalidate() from different form then i gives me error that i have to invoke this method from the same thread.
i tried do upate my code accordingly (http://www.codeproject.com/csharp/begininvoke.asp)
but i get the same error.
will appreciate help.
regards,
rnv
|
|
|
|
|
Try making sure that you're Main function is marked with a STAThread attribute. If you're not using any multithreading that it
Ed
|
|
|
|
|
i would like to know how to read an image with c#
if u can give me a code in witch there are an example
developpement
|
|
|
|
|
Do you mean this?
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
You can use this code:
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)<br />
{<br />
Graphisc g = e.Graphisc;<br />
Bitmap bmp = new Bitmap("your_image.jpg");<br />
g.DrawImage(bmp, 0, 0);<br />
}
-- modified at 9:27 Thursday 16th March, 2006
|
|
|
|
|
Except that it will leak resources. The Bitmap reading code should ideally read to a member variable ( why do it every time ? ), or at a minimum, should be in a 'using' block.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a Deployment project which includes a Customer Information Dialog box. I want to use the information entered in my Custom Action class AfterInstall. Does anyone know how I can do this?
|
|
|
|
|
Can any one guide me how to launch the installed application immediatley after the Finished screen button clicked. Once the user clicks the finished screen "Close" button, i need to launch the installed application. I tried with installer class. Sample code is given below.I have created a class library and within that an installer class. I tried with the afterInstall event, but its not working.
namespace ClassLibrary1
{
[RunInstaller(true)]
public partial class Installer1 : Installer
{
public event InstallEventHandler AfterInstall;
public Installer1()
{
InitializeComponent();
AfterInstall += new InstallEventHandler(AfterInstallEventHandler);
}
private void AfterInstallEventHandler(object sender, InstallEventArgs e)
{
Process.Start(@"C:\Program Files\Surisoft\SampleSetup\SampleApplication.exe", "/q");
}
}
}
Regards
Mukilan.P.S
|
|
|
|
|
i have two form: Form1, Form2 and Form3. Form1 is MDI Parent form. i'v made Form2 to open when one menu is clicked from Form1. Now Form2 has one button which should show Form3, and i'v done the code this way:
Form3 frmF3 = new Form3();<br />
Form1 fm1 = new Form1();<br />
<br />
frmF3.MdiParent = fm1;<br />
frmF3.Show();
but clicking the button is performing nothing. how can i do that?
|
|
|
|
|
Dear,
Try to structure your code by doing the following:
-In form3 add the following Function:
public void Create(Form ParentWnd)
{
MdiParent = ParentWnd; Show();
}
- Now from Form2 do the follwing from a function of course:
Form3 form3 = new Form3();
Form ParentForm = this.MdiParent;
form3.Create(ParentForm);
I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design
|
|
|
|
|
thanx for ur help
i did this way
Form3 frmF3 = new Form3();<br />
<br />
frmF3.MdiParent = this.MdiParent;<br />
frmF3.Show();
it worked. thanx again.
|
|
|
|
|
Hi there
can someone please help me?
I want to select a row from form1 and then open another form (form2) which shows the same row but with some more fields...
so..
form 1. datagrid about 4 collums from the database table. then dubbel click on it
form 2. a couple of textfields.. (about 10) which shows all the records in the row.
i use C# winforms.
i've tried a lot of thinks but it just won't work....
|
|
|
|