Server Error in '/' Application.

Index 0 is either negative or above rows count.

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 0 is either negative or above rows count.

Source Error:


Line 306:        dv_album = ds_album.Tables[0].DefaultView;
Line 307:
Line 308:        albumadi = dv_album[0]["AlbumAdi"].ToString();
Line 309:
Line 310:        return albumadi;

Source File: c:\inetpub\vhosts\modernraf.com\httpdocs\App_Code\fotogaleri.cs    Line: 308

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +6286367
   System.Data.DataView.get_Item(Int32 recordIndex) +16
   fotogaleri.MTD_AlbumAdi() in c:\inetpub\vhosts\modernraf.com\httpdocs\App_Code\fotogaleri.cs:308
   controls_WC_Navigasyon.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\modernraf.com\httpdocs\controls\WC_Navigasyon.ascx.cs:88
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.9172; ASP.NET Version:2.0.50727.9161