|
So what is the error you are getting? Are you certain the account running the ASP.NET worker process has permission to write to the C:\ directory?
|
|
|
|
|
Hi.
I am just running this on my own PC and I pretty much copied the code from a book to learn and modify later. Everything seems to be OK but when I right-click and choose view in browser I get:
A generic error occurred in GDI+ and this line gets the red color:
bm.Save("C:\\Mypic.gif", ImageFormat.Jpeg);
This just doesn´t make sense
F
|
|
|
|
|
Perhaps you need to look at the InnerException of the exception you are getting? The outer exception may say "generic error", but often the InnerException will have more details.
I'm still betting that your ASP.NET worker process does not have permission to write to your C:\ directory. Any comment on that?
|
|
|
|
|
Hi.
I am not really following you If you are right, how do we fix the problem?
F
|
|
|
|
|
|
Hi.
It just so happens that I have 2 hard drives, c and e. I changed the code to:
bm.Save("e:\\mypic.gif",ImageFormat.Jpeg);
and it made all the difference in the world , the image appears on drive e. You were absolutely right!! Very impressive. On the other hand I don´t understand why this small change makes such a big difference? Do you have any suggestions on how I can make the pic save to c?
F
|
|
|
|
|
Hello dear,
I have just use this code of yours and it is working absolutely fine. Storing the picture in the given folder and displaying it in Browser or anything else.
Bitmap bm = new Bitmap(300, 300);<br />
Graphics g = Graphics.FromImage(bm);<br />
g.DrawLine(Pens.WhiteSmoke, 10, 10,180,10);<br />
g.DrawLine(Pens.White,10,10,10,180);<br />
<br />
bm.Save("C:\\mypic.gif", ImageFormat.Gif);<br />
bm.Dispose();<br />
g.Dispose();
I have modified a little bit.
regards
Mubashir
|
|
|
|
|
Hi.
If I comment out this line: bm.Save("C:\\mypic.gif", ImageFormat.Gif);
I get no error reports but I want to save it to my hard drive.
F
|
|
|
|
|
i want to drag and drop list box item in the tree view. in c#
any ideas ,
thanks in advance.
|
|
|
|
|
Hi
this is balavardhan,
Is there any chance to auto refresh the data in datagrid after some time of the first retrival
Thanking you for info
Balu
|
|
|
|
|
Hi there,
You can put this tag <META HTTP-EQUIV="Refresh" CONTENT="5; url=http://yourpagehere"> into your page...
<< >>
|
|
|
|
|
Hi,
But if use any session variables tehn meta tag will refresh the session variables also.
|
|
|
|
|
Do you mean that the session variables will be lost after auto-refresh?
<< >>
|
|
|
|
|
Ya I mean the same.After the metarefresh tag the session variables will be lost.Not all the times.SOme times it happens.I have experienced it.
|
|
|
|
|
it sounds strange
But this issue might be that the interval time in metarefresh tag is greater then the session timeout value. so when when the page is refreshed, all session variables will be reset. I'm not sure this cause is correct or not
You can check it again and let me know then, ok?
<< >>
|
|
|
|
|
Only return & l t ; or & g t ; .
How to do?
Thanks!
|
|
|
|
|
it sounds strange....Does your method return any value????
<< >>
|
|
|
|
|
Yeah.
The << and >> could not show in the page.
|
|
|
|
|
can you post ur code? and briefly describe the way you deploy ur service?...
<< >>
|
|
|
|
|
[webservice]
public string test()
{
return "b<c>";
}
|
|
|
|
|
The return value includes "<" and ">" which is a xml string.
|
|
|
|
|
I have created an asp.net site on an educational server, but its a bit slow. I think this is due to having to pull .jpg's everytime a new page loads. Is there a way to speed this process up or make it more efficient if the same jpg's are being used on different pages?
|
|
|
|
|
i think it's nothing,if your pictures not more on one page.
|
|
|
|
|
IMO, the issue here might be caused by another problem, not due to pulling image files. As I know, the browser will use cached images instead of re-loading
<< >>
|
|
|
|
|
hi,
I have a Button control in datagrid footer. How can i have an event handler for that button. I have Edit buttons also in the datagrid.
please help
Tirthadip
|
|
|
|