Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Quote:
Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

source error :

Line 54: runat="server" />
Line 55:
Line 56: <% Response.Write(Data.Strings["FundsFY16"]); %>
Line 57: <asp:Label ID="Welcome" runat="server" />
Line 58:


stack trace :
Quote:
[KeyNotFoundException: The given key was not present in the dictionary.]
System.Collections.Generic.Dictionary`2.get_Item(TKey key) +11016965
ASP.fund_fy16_aspx.__Renderform(HtmlTextWriter __w, Control parameterContainer) in c:proj\Fund_FY16.aspx:56
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +216
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
ASP.fund_fy16_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:proj\Fund_FY16.aspx:39
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386
Posted
Updated 8-Jun-15 11:45am
v2
Comments
Sergey Alexandrovich Kryukov 8-Jun-15 13:12pm    
The key is not in the dictionary; what makes you believe that it is supposed to be there? :-)
What's the point showing exception stack without showing the code throwing the exception?
—SA
jay539 8-Jun-15 17:35pm    
yes thank you ...i have not declared a string and used it some where else my bad i got to know now where should i look at
Thanks !
Richard Deeming 8-Jun-15 13:14pm    
The Strings dictionary on your custom Data class doesn't contain an entry with the key TitlesByFundsFY16.

Since we can't see the definition of your custom class, only you can find out why that entry doesn't exist.
jay539 8-Jun-15 17:27pm    
yes thank you very much i got it ..there was no string named TitlesByFundsFY16. in my data class file i so declared it, since i duplicated TitlesByFundsFY15 i forgot to add string @data.cs . my code is doing good now thank you very much once again :)
ZurdoDev 8-Jun-15 13:29pm    
The error should be clear. So, what is the question?

1 solution

yes thank you very much i got it ..there was no string named FundsFY16. in my data class file i so declared it, since i duplicated FundsFY15 i forgot to add string @data.cs . my code is doing good now thank you very much once again :)
 
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