I have a MVC3 application which uses Devexpress controls.My first page works fine, but this is not strongly typed.I get the error "BC30451: 'ViewData' is not declared. It may be inaccessible due to its protection level" on my second page which starts with:
Dont have any intellisense when creating a sample MVC3 app.Config files are fine, project compiles and works as it should when ran...Have MVC3 & MVC4 installed, same thing with each.Have VS2010 & VS11 installed (running fine side by side), same thing here... no intellisense.
Errors:'ViewData' is not declared. It may be inaccessible due to its protection level.'Url' is not declared. It may be inaccessible due to its protection level.'Partial' is not a member of 'System.Web.WebPages.Html.HtmlHelper'.'ActionLink' is not a member of 'System.Web.WebPages.Html.HtmlHelper'.
The 'ActionLink' error should be trageting the Mvc library should it not?
The simple code we have written compiles and executes fine in my class and work computers - both xp. when I try to compile the exact same code on my home windows 7 computer, I get error messages:
c:vbpayroll2.vb(17) : error BC30451: 'InputBox' is not declared. It may be inaccessible due to its protection level.
and
c:vbpayroll2.vb(20) : error BC30451: 'Convert' is not declared. It may be inaccessible due to its protection level.
I am working on my new server now. I have created very simple page which has a for loop on code behind. If i dont define "i" as integer before the loop, i got this error
Compiler Error Message: BC30451: Name 'i' is not declared.
But, i can use for loops without declaration of "i" before loop.
For i = 1 To 10 Response.Write(DateTime.Now.ToString) Next
Hi everyone. I havent used VB for about 4 years so I am trying to refresh my memory for a project I am doing. I want to link it to an Access database and have the following code:
[ Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click
Dim sqlstring As String
Dim conconnection As New ADODB.Connection Dim cmdCommand As New ADODB.Command Dim rstrecordset As New ADODB.Recordset
With cmdCommand .ActiveConnection = conconnection .CommandText = "SELECT * FROM tblRegister;" .CommandType = adCmdText End With
With rstrecordset .CursorType = adOpenStatic .CursorLocation = adUseClient .LockType = adLockOptimistic .Open(cmdCommand) End With ]
However when I run the program I get the following error messages:
error BC30451: Name 'App' is not declared. error BC30451: Name 'adUseClient' is not declared. error BC30451: Name 'adCmdText' is not declared. error BC30451: Name 'adOpenStatic' is not declared. error BC30451: Name 'adUseClient' is not declared. error BC30451: Name 'adLockOptimistic' is not declared.
Is there some sort of Add-In or reference I need to add? I can't remember how I did it last time!
I want to use text to speech to say what is in my textbox. I have added the reference into the solution (MS speech object libarary) and inserted the "imports speechlib but i am getting an error when building.
error BC30451: Name 'voice' is not declared.
according to turtorials i have everything right, but i am still gettiing this error. here is my code;
Why i run script 1 is give me the Compiler Error Message: BC30451: Name 'Rpttitle' is not declared. But when run script 2 is working fine with output? Anybody have an solution about this issue?
I'm getting this error in an open source project that runs fine on a dev machine with iis7, but breaks in iis6. Has anybody else gotten this message or is there a way to decifer it?
On the page so far i have 4 text fields and a label and a button the page works up until i put the code in for the submit button then i get this error. BC30451: Name 'labelMessage' is not declared.
The code is Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Line 9: If Page.IsValid Then
Having trouble here and not quite sure how to do it. I've attempted jQuery but with no luck. I have an object and on my create view, I have a parentId that I want to set (it's in the url as well). So, I'm trying to use Html.HiddenFor so it will populate my new object when returned on the post. BUT, this doesn't work. I've tried the following but it never returns the value on the post.[code]...
As you can see, on doc ready, I set the hidden parent id input with the value from the viewdata because the HiddenFor doesn't have a value attribute. The HiddenParentId field DOES in fact have the value that I'm setting because I'm alerting it and it's got the GUID that it should have. Now, first, I'm using VB so any help in VB would be greatly appreciated and second, if there's another method to solve this issue, please advise. All I'm trying to accomplish is to get the ID that was passed in the URL (which in the controller I'm grabbing that id and putting it in the ViewData) and set the ParentId property of my object for the post so that it will save it when the object is returned to me.
I have a simple IF THEN ELSE block which checks for the presence of a querystring and then checks if it is set. The idea is that if no querystring, the form is empty and people can enter a new form. If there is a querystring and it isn't blank, a db query for the form data occurs, fields are populated and a user can update the form.
so here is my code block.
Dim strQueryStingCheck As String If Not (Request.QueryString("pid") Is Nothing) Then ' is there a querystring? If Request.QueryString("pid").ToString <> "" Then ' does it have a value?
[code]....
I am getting the "Variable is not declared; it may be inaccessible due to its protection level" for strQueryStringCheck ONLY on the Else code block - that is when I set strQueryStringCheck to "e". I can't figure it out.I've looked at other posts, particularly this one. and it was helpful. I can make the error go away, but I want to understand why I am getting it in the first place. I declared it within the subroutine. And if I was doing something wrong, shouldn't it throw an error on BOTH blocks of the IF THEN ELSE block? It doesn't when I set strQueryStringCheck to "u". Why only in the ELSE block?
Dim asInteger As Integer = 42 Dim aSingle As Single = 39.345677653 Dim Astring As String = "I like Candy" Dim aBoolean As Boolean = True
[code]....
and im getting an error saying anInteger is not declared. Could anyone give me some help to why this is happening and also how it is fixed and give me some information so i can understand why it is not working so i no for future reference. Just reading back over my code i have realized i put
Dim asInteger As Integer = 42 instead of Dim anInteger As Integer = 42
I am getting the error: "Name 'GlobalScope' is not declared" and have not been very successful researching online or in books. I am getting this error on line: GlobalScope.BasicLibraries.LoadLibrary("Tools") I am Using a code i found online
'Opens a Open File Dialog to allow the end user to select a file to import into the program. 'This code is from Andrew Pitonyak's free Useful Macros book Dim fOpenFile As String Dim oFileDialog As Object
I have a simple label in ASP.NET. I want to set text to it in VB.NET. The id for the label is norecords. The VB.NET code is like this: lblnorecords.Text = "No Record found".
However, it gives me error saying: name norecord is not declared.
I am trying to replicate this example of calling IronPython code from VB.net. I've downloaded and installed IronPython and created a VB.net console application. I added references to all of the dlls in the IronPython installation folder:
I receive the error "Name 'PythonEngine' is not declared." I can't seem to find PythonEngine when I search the ObjectBrowser. Is the example out of date or do I have an error?
I am trying to connect to his PC and receive data at an IP address. I think I have sussed Winstock However, im having problems with this command:
If AxWinsock1.OcxState <> sckClosed Then 'If Winsock is not closed AxWinsock1.Close() 'Then Close the Connetion AxWinsock1.Accept(RequestID)
The error is to do with the underlined sckclosed command and the error reads
"sckClosed' is not declared"
my understanding is this is a standard command. I have tried declaring it in various ways and nothing has worked. I am using Visual studio 2005. Does it support it ?
I cannot figure out what is wrong with my code. Yes I understand its giving me 4 error messages about visual basic 2010 Express seeing some of my variables as undeclared. Below is the code.
I am trying to run this line of code: Dim OrderedFiles() As String = Directory.GetFiles(FilePath).OrderBy(x >= x.CreationTime)
I get an error on x saying x is not declared. I have my project set to Option Strict Off and Option Infer On. If I turn ON Option Strict then I get thousands of errors from the project(it is inherited) and I don't have the time to fix all of them, but x no longer gives me an error. I have googled until I want to throw my computer out the window.
I was hoping for a more elegant solution but here is what I came up with to solve this particular problem.
[Code]...
It is not particularly elegant but it does the job. I was hoping for a one liner LINQ solution and I just don't have the background in LINQ to know how to do the job, time to go buy a book.
i am creating project using Console Application . In this project i have class car and Module1. I also declared Public Color as string in Car class. In module1 i set the color property for this objectcar.The probleam is i still get an error Name 'red' is not declared. i also highlight line which give me this error.
Module Module1 Sub Main() Dim objcar As New Car objcar.Color = red
I have a code in VB 6 but doesn't in VB.NET. Even I was converting, but, there's a thing that I can't convert because I don't know what "hProcess" means .
I'm running through this tutorial found here: report_from_multiple_tables.htmwhich teaches how to pass a parameter text field on a vb form to an embedded Crystal Report in visual studio. I've followed it all the way through however when I attempt to build, I received the error: