|
I am trying to delete a directory using object of Directoryinfo but it leaves an inaccessible directory on disk. This folder becomes Read only.How can I delete directory permanently.
|
|
|
|
|
In ASP.NET, you can only manipulate folders within your server root directory
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How can I set resolution of uploaded image and convert it into byte array so that I can store it in database
|
|
|
|
|
The bitmap class's save method has an over load that takes a stream, you can use a buffered stream to end up writing to a byte array.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
Thanks for your response. In the following code I get error
System.Runtime.InteropServices.ExternalException: A
generic error occurred in GDI+.. Please help me.
string NewFile = System.IO.Path.GetFileName(userPostedFile.FileName);
string imagepath = filepath + System.IO.Path.GetFileName(userPostedFile.FileName);
System.Drawing.Image imgSource = System.Drawing.Image.FromFile(imagepath , true);
Bitmap bmp = new Bitmap(imgSource);
bmp.SetResolution(72, 72);
bmp.Save(NewFile);
FileStream fs = File.Open(NewFile, FileMode.Open);
System.Drawing.Bitmap newimg = new System.Drawing.Bitmap(fs);
MemoryStream ms = new MemoryStream();
newimg.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
newimg.Dispose();
byte[] imgdata = new byte[ms.Length];
ms.Read(imgdata, 0, NewFile.Length);
imgdata= ms.ToArray();
Thanks
|
|
|
|
|
Which line gives the error ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have a web-page which displays details from a database to a user which can be updated.
How can i lock the page to a specific user so that if a different user logs on and tried to access it they can only see a read only version.
any articles or ideas would be great
thanks!!!
|
|
|
|
|
You would do this in the DB, you'd store a value to say which user had the lock, and the date/time of the lock, so it can be expired after an appropriate time
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
thanks for the reply.
I have now set up a table which stored a session value for the user's login
My next question is, is it possible to delete the person's entry into the table after say half hour?
any help would be great
thanks
|
|
|
|
|
When you try to access the record, you check if it's locked, AND you check the time it was locked. If the lock has timed out, you ignore/overwrite it.
It doesn't matter if it timed out after 30 minutes, only that it was recognised as having timed out at whatever point after 30 min, someone else tried to access it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yeh but thats the bit i'm stuck on
How would i check that its been more then 30 minutes?
i.e. do i have an IF statement in the c# code saying something like
if datetimefield > 30???....
This is a new area to me
I undertsand the logic just don't know the syntax to check for more than 30 mins
thanks for the help so far!
|
|
|
|
|
hi,
-> how to store session id in URL ?
Dude...
modified on Tuesday, February 26, 2008 4:57 AM
|
|
|
|
|
Why would you want to ? Or do you mean, how do you set ASP.NET up so the URL is used to store the session Id ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Friends...How to disable our browser back button? help me please
Gopinath.R
|
|
|
|
|
You can't. You can write javascript that navigates you back forward, but that's just a hack and easy to side step.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Friends ..
I've a difficulty related to GridView control (language C#). I've placed Dropdownlist in the GridView Control. How can I fire the change event of the dropdownlist.
placed in the GridView or any event ..
thanking you ...
... Smile is the curve, which makes everything streight ...
|
|
|
|
|
Your issue is that you need to do your data binding before page load, so that the event can fire, because otherwise, viewstate is recreated before the control exists, for the event to be restored.
The automatic gridview row editing features will just handle this for you, if you only want it for a row you are editing.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello Everybody,
I have an application where I pass some values in QueryString. Can anyone tell me how to pass the value in an encrypt format.
HappyCoding
A key to every Solution
|
|
|
|
|
.NET framework has many libraries supports Encryption and Decryption. Check System.Security.Cryptography name space.
|
|
|
|
|
Perhaps if you need to encrypt it, you should just find another way to store it, like in the session ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all
I m working in asp.net(vb).
In my site i have binded the grid view with database but now i wanna know how can i add Accordion ajax control in each row of datagrid view in asp.net
I hope someone will understand it,Looking forward for your response
Thanks with anticipation
|
|
|
|
|
I am not sure of your actual purpose.
However, you can add any control to ItemTemplates of the GridView
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Hai
I need to add rows with asp controls dynamically on each button click
in my code only one row is created on button click event. that is removed on another button click
Plz help me
|
|
|
|
|
asp, or asp.net ? What do you want exactly ? To add multiple rows ? Is the control data bound ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I need to add One row with Multiple columns on each button click.
Here each column contains textboxes or dropdown list controls.
My table initialy contains one row. After clicking on Add new button, i need to add new row below to the existing table.
Also wants to remove the last row on remove button click.
Plz help me for this
|
|
|
|