Jump to content

how to use confrim box in asp.net.


soona

Recommended Posts

Hi,This is my code :public static bool IsValidImageDimention(HttpPostedFile postedFile, int specifiedWidth, int specifiedHeight) { Bitmap NewBitMap = new Bitmap(postedFile.InputStream, false); { if (NewBitMap.Height == specifiedHeight && NewBitMap.Width == specifiedWidth) { return true; } else { return false; } } }Please see else{ "return false;"} statement.Here, i would like to use confirm box for delete. the given explanation is: i uploaded the images when it is even otherwise goes to else statement with confirm box.My query: how to use confirm box "script" in asp.net code.Please give any idea about that and syntax also. please replay soon.With kind regardsNancy

Link to comment
Share on other sites

Hi jes,Thanks for your kind advice.The "return false" statement :- >i need to display some message ("Please choice images size of '250 X 188',because your uploaded images is not placed").How to do this?Version: vs 2005(asp.net with c#)With kind regardsNancy.

Link to comment
Share on other sites

Did you read aspnetguy's comment? I know neither ASP nor .NET, so I have no idea how to output JS or, for that matter, respond to it. I really think this needs to be in the ASP or .NET forum.For the JS part, here are some references:MozillaMicrosoft

Link to comment
Share on other sites

In your code you are using the postedFile.InputStream. This is just the bytes of data submitted via the form. It is not saved on your server. You cannot delete a file that is not on your server.I don't understand what you want to do. Is there other code that you have not shared that actually saves a file to your server???

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...