Index was outside the bounds of the array.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[IndexOutOfRangeException: Index was outside the bounds of the array.]
Continental.IngresarAntena.Mapa_Click(Object sender, ImageClickEventArgs e) +371
System.Web.UI.ImageClickEventHandler.Invoke(Object sender, ImageClickEventArgs e) +0
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +108
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
|
it gives me this error when i click a imagebutton in my asp form.... but i dont have any code... ANY HELP please?
protected
void Mapa_Click(object sender, ImageClickEventArgs e)
{
//string[] dir = Mapa.ImageUrl.ToString().Split('/');
//Response.Write(dir[0]);
//System.Drawing.Image imagen = System.Drawing.Image.FromFile(Server.MapPath(dir[0] + "/" + dir[1] + "/" + dir[2] + "/" + dir[3]));
//Graphics graph = Graphics.FromImage(imagen);
//Pen p = new Pen(Brushes.Green);
//if(File.Exists(Server.MapPath("images") + "\\image.jpg"))
//{
// File.Delete(Server.MapPath("images") + "\\image.jpg");
//}
//string SaveLocation = Server.MapPath("images") + "\\ONLINE.ico";
//Icon icono = new Icon(SaveLocation, 260, 260);
//graph.DrawIcon(icono, e.X, e.Y);
//SaveLocation = Server.MapPath("images") + "\\image.jpg";
//imagen.Save(SaveLocation, System.Drawing.Imaging.ImageFormat.Jpeg);
////imagen.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
//imagen.Dispose();
//string hola = Server.MapPath("images");
//Mapa.ImageUrl = "images/image.jpg";
TextBox11.Text = e.X.ToString() +
"," + e.Y.ToString();
}