|
The location would be with Screen Coordinates right? Also which part of the window would be touching that coordinate(I'm guessing top left, but not sure)?
|
|
|
|
|
I'm writing a series of 2 commands:
Monitor.Enter(sema_resource); // Seize?
Monitor.Exit(sema_resource); // Release?
where
decimal sema_resource= 0;
But Visual Studio 2005 rebukes me about the second command and says that I'm going to release what I never had seized.
Brethren, please, how correctly to work with the Monitor class? (I need it for resources guarding on some code sections in the multitasking environment).
HilSoft
|
|
|
|
|
Try to use the Monitor[^] object with reference type, not value tye as the decimal .
|
|
|
|
|
Thank you very much.
I will pass to the Monitor just the class's instance which I want to guard.
Please, tell me how can I post (signal) that the resource is free? Should I use
Pulse(resource);
or
PulseAll(resource);
? I do not understand it clearly. And how I now that I need give the command
Wait(resource);
- maybe the resource is not seized, and I will wait eternally...
HilSoft
|
|
|
|
|
|
Thank you. The article, you've been referred to, just prevents of ReaderWriterLock using, and suggest to use the Monitor class instead.
But my problem (my question) is just about the Monitor class using: how can I use the nice class correctly? Please, help who knows.
HilSoft
|
|
|
|
|
Hi Friends,
I am succesfully putting image to datagrid column and its working fine.
Can any one tell me please how can I get image url back from gridview column to
store in a variable.
Any help will be appricieated.
tahnks
Naveed Kamboh
|
|
|
|
|
You simply get reference to the image control and get the image url.
|
|
|
|
|
Dear its a imagecolumn in gridview, Can you help me how to get reference of that column.
Naveed Kamboh
|
|
|
|
|
Hi there. The ImageField of the GridView contains an Image control internally, you can first get reference to the GridViewRow using the GridView.Rows, then you can look at the specific cell of the row where the imagefield is defined, and you can find it out from the Controls collection of the cell.
|
|
|
|
|
HI
can any one let me know that how to use Microsoft agent character in ASP.Net 2.0 , the character should be on the client side and the text which the character will speak will be dynamic(which will be get from the data base) and the gestures it will show will depend upon the values got from the data base.Please can any one let me know how to do it , if any one can provide the example , it would be great,
regards,
tippu
|
|
|
|
|
hi,
iam having ASP application With two input fields Username,Password and one button on click of button user information should store in xml.
I want to implement this with "Client Call Back"
Client Call Back.
is any one know it please help me.
kamalnath
|
|
|
|
|
|
I am developing an application in ASP.NET 1.1. on one page I allow the user to upload and delete the files to the server.
When I delete the file, I physically delete the file from the location. Then I again prompt the user to load a new file but I save the file with the same name the earlier image file had been saved. The problem is that when I again upload the page through Response.Redirect after uploading, it is showing the same image it was showing before deletion whereas in that location on server, there is another image. How my view of the image in the Image Control will change when a new picture has come.
Please give me any suggestion. All your suggestion are welcome.
Thanks in advance
Thanks,
Sandeep S. Sekhon
|
|
|
|
|
Looks like the image is cached. Can you see the new image if you refresh the web page? There are a couple of work-around options that you may try:
+ Use another name for the new image.
+ Use a seperate web page or custom http handler to read the image data and send it to the output stream.
|
|
|
|
|
Hi all,
I want to return a binary file from my webserver in .NET, so I've created an aspx file to do this, I then have something like this:
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "inline;filename=data.dat");
using (BinaryWriter writer = new BinaryWriter(Response.OutputStream))
{
for (int x = 0; x < 100; x++)
{
writer.Write(x);
}
}
}
This works well in that I get my binary data and IE pops up a save file dialog, but the problem I have is that ASP.NET adds on a load HTML stuff to the end - the default output from an aspx page.
Does anyone know how I can prevent ASP.NET from adding this stuff to the end and corrupting my file?
Thanks for the help!
Regards,
Rob Philpott.
|
|
|
|
|
Remove the content of the page, so that it only contains the @Page directive.
---
b { font-weight: normal; }
|
|
|
|
|
Tried that - complains that there was no <HTML> tag.. ?
Regards,
Rob Philpott.
|
|
|
|
|
Who complains?
---
b { font-weight: normal; }
|
|
|
|
|
I have this code to get an image from a database and just shoot out the binary so I can use images from a database in a datagrid with template column and asp:images. So I can put "~/GetPic.aspx?id=X" in the ImageURL attribute of the asp image. Hope it helps.
<br />
int id = Convert.ToInt32(Request.QueryString["id"]);<br />
<br />
Advertisement ad = new Advertisement(id);<br />
<br />
Response.ClearContent();<br />
Response.ContentType = "image/jpeg";<br />
Response.OutputStream.Write(ad.Image, 0, ad.Image.Length);<br />
Response.End();<br />
<br />
|
|
|
|
|
Perfect! Thank you. It's ages since I've done any ASP.NET stuff, and the line I was looking for was simply:
Response.End();
Regards,
Rob Philpott.
|
|
|
|
|
Hi,
I am doing a project in ASP.NET. I need to give the user to upload the documents through the website. While uploading the document, I would like to show the progress bar to show the status of the upload process. How can I do this?
With Regards,
Sheshadrinath.R
|
|
|
|
|
|
Hi there.
I have a GridView and a FormView. The FormView ObjectDataSource is listening to the Grid´s selected ID to display the detailed Data.
It is not visible before I select anything from die Grid.
What I would like to do is to show the FormView in Insert Mode, if there is no data in the Grid or no data has been selected yet. At the same time I´d like to display a message in the Grid if there is no data to display.
It would be nice, if someone could point me in the right direction
Thanks in advance,
Brokit
|
|
|
|
|
+ To display something when the datasource of the GridView control is empty you can use the EmptyDataText/EmptyDataTemplate properties of the control, you can read more about these in MSDN.
+ Also to change the default mode of the FormView to Insert, you simply check the datasource length, if you use the DataSource control with the GridView control you can do a checking on the select result in the Selected event, then change the mode of the FormView with the DefaultMode property or the ChangeMode method.
|
|
|
|