CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
CS0103: The name 'getName' does not exist in the current context.
- Article ID:
6253 - Date Created
Thursday, June 16, 2022 - Last Updated
Friday, June 17, 2022 - This Article Has been Viewed
402 times - Short Desc
The name does not exist in the current context and will happen if one of the following is true in both C# and VB.NET. - Details
The code below uses getName(v), but it is not properly formatted.
(Ignore the open and closing brackets in these examples)<%
Response.Write(getFile + "(" + getName(v) + ") Uploaded Successfully!<br />");
%> - Recreate Issue
The code below uses getName(v), but it is not properly formatted.<%
'C#'
Response.Write(getFile + "(" + getName[v] + ") Uploaded Successfully!<br />");
'VB
Response.Write(getFile & "(" & getName(v) & ") Uploaded Successfully!<br />");
%> - Resolve Issue
We need to look at the source for the getName(v) variable and make certain it is spelled properly.
The originating code is<%
'C#'
string GetName = Request.Form["ImageTitle"];
OR
'VB
Dim getName As String = Request.Form("ImageTitle")
%>
Looking at both examples we see that our name starts with a capital G and not a lowercase g.<%
'C#'
Response.Write(getFile + "(" + GetName[v] + ") Uploaded Successfully!<br />");
'VB
Response.Write(getFile & "(" & GetName(v) & ") Uploaded Successfully!<br />");
%>
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825