Click here to Skip to main content
15,901,666 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my code is as:
C#
 protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    
   public void Binding()
   {   
       SqlParameter[] param_add_user = new SqlParameter[] 
            {
               new SqlParameter("@Time1",txtDate1.Text),
               new SqlParameter("@Time2",txtDate2.Text),
            };

       DataSet ds = SqlHelper.GetDataSet(SqlHelper.mainConnectionString, CommandType.StoredProcedure, "Date_Range",param_add_user);
       GridView1.DataSource = ds;
       GridView1.DataBind();

   }
   

   protected void Button2_Click(object sender, EventArgs e)
   {
Binding();
   }


error is :
There is no source code available for the current location.

what to do,plz help me.
Posted
Comments
hitech_s 28-Apr-12 0:17am    
in which line you are getting error ? if you dont know debug your code.
I think the best solution is clean your solution and rebuild it or do one thing that delete the references and add those again

same problem solved here , have a look :
There is no Source code available for the current location. in ASP .net[^]
this might help you
 
Share this answer
 
Comments
VJ Reddy 28-Apr-12 0:25am    
Good reference. 5!
member60 28-Apr-12 0:26am    
thank you Reddy
This happens when PDB file is not updated. Compiled DLL and the respective PDB file needs to be of same timestamp.

Compile your solution/project where you are trying to put this breakpoint.

When it says, breakpoint will not be hit or no source code available for the current location: it simply means that the PDB file for the dll is missing or an old one.
You need to make sure that the DLL last modified date and PDB last modified dates are in sync. PDB files are the one responsible that helps you in debugging.
Clean the solution and rebuild all. This should create a new dll along with PDB. Once done, you should be able to debug it.
 
Share this answer
 
Comments
Espen Harlinn 28-Apr-12 6:18am    
Good answer :-D
Sandeep Mewara 28-Apr-12 7:01am    
Thanks.
:)
In my case, I had advanced the system date two days (from May 18 to May 20) to test something. I rebuilt the project at some point before returning the date to May 18. Later, after doing some editing, including deleting some lines in Sub Main, I started getting the message "There is no source code available for the current location" when trying to step into the program.

Based on suggestions I read elsewhere, I moved all the PDB files to a Temp folder and recompiled. Everything was back to normal.

Apparently if the PDB files are 'newer' than 'Now', VS won't overwrite them. Live and learn.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900