VS 2008 Calling A Sub In A Different .vb File
Jan 3, 2010
I need to call a sub which must be contained within a separate web page, but even though it is declared as public, when I call it like this:Code:
Cart.addMovie(ByVal title As String, ByVal format As String, _
ByVal copies As Integer, ByVal price As Double)
I'm getting this error:
Code:
Error1Reference to a non-shared member requires an object reference.C:Documents and SettingsJohn Wesley CooperMy DocumentsCollegecis259MovieStoreMovieStoreDefault.aspx.vb489MovieStore
View 35 Replies
Similar Messages:
Aug 27, 2010
I am trying to interface a website we have with our helpdesk software. The helpdesk software has a REST API that i can connect to. So far I have been successful in getting a current ticket with the following code.
[Code]....
[URL] How would I implement this in ASP.Net? I want to create the ticket, and need to be able to retrieve the access key that it returns. I tried using the same code above, but instead changing the method string to this.
Code:
method = "request.create&tNote=Testing method&sFirstName=Jose"
But I get a "Bad Request" error from it.
View 3 Replies
May 6, 2010
Can this be done?
View 4 Replies
Feb 17, 2011
I have a .aspx page that has a button on it.When the user clicks on the button, it should call another .aspx page. I am using the following javascript code that works well in our development region. But when it is deployed to another IIS server, it doesn't work.
Code:
function Open_HistoricalRunswindow() {
window.open("http://10.129.1.102/QAWebUI/HistoricalRuns.aspx", "_blank", "toolbar=no, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=no, width=1000, height=500");
}
I replaced the IP address with the word localhost and it didn't work either.For some reason, when the user clicks on the button, it opens up another browser window and the address seems to be like this. which is very weird.[URL]I don't understand why the link is getting messed up? Is there any alternate solution for this problem? May be I use server code to call the .aspx page instead of Javascript?
View 4 Replies
Sep 17, 2010
i have used PageMethods to access the server side functions in javascript , but now my problem is that with pagemethods your controls will not go throught the full page lifecyle and these leads me to have "Object not set for an instance of an object" error. Now can someone come with a differnt approach without using pagemethods. What i want is to call a server side function , i dont want to pass any parameters to it
View 5 Replies
Mar 18, 2010
we can not add .mdf file to the project in vs2008 and sql server2008 when i am adding .mdf file its displaying an error message so it is not possible to add
View 2 Replies
Nov 20, 2010
i am working on a project where i have to give call to an .exe file to access the scanner on client side. i am using System.Diagnostics.Process.Start(Server.MapPath("~/bin/Scan.exe").ToString()"); to call exe file in my bin folder on to the server, but it is not getting called.
View 4 Replies
Oct 5, 2010
I have a custom control which is used on many pages. I am making use of a jQuery plugin shown in the below link. [URL]
Problem is this plugin loads on the pages which take time to load and fails on those which load quickly.I also have multiple instances of this plugin on the same pages. I have tried calling the plugin in two different ways as listed below. But it is making no difference.I am doing everything in .cs file. I don't have aspx or ascx file.
01)
Page.ClientScript.RegisterStartupScript(GetType(), "dropdownchecklistOrg-setup" +
this.GetHashCode(), string.Format("$(document).ready(function() {{ $('#{0}').custSelectBox();}});", listBox.ClientID), true);
02)
Page.ClientScript.RegisterStartupScript(GetType(), "dropdownchecklistOrg-setup" + this.GetHashCode(), string.Format("$('#{0}').custSelectBox();", listBox.ClientID), true);
I get the below error on the pages which are loaded quickly.
$('#ctl00_FullRegion_MainRegion_EditForm_PredefinedLocations_DropdownCheckList').custSelectBox() is not a function.
This issue was due to different versions of jQuery library being loaded. I had 3 plugins on the same page. 1 plugin was loading jQuery 1.42 version and the other 2 plugins were loading jQuery 1.32 version.If the 1.42 version was loaded at start up the other two plugins would fail to work.
View 1 Replies
Feb 24, 2010
I have a JavaScript-based timeline which needs to use data from an SQL server. The queries and the JSON conversions have been worked out in the form of C#.NET functions within a code file related to an .aspx page. So for a complete newbie to ASP.NET, how do you set up a function call like this from JavaScript?I would love it if someone had some simple example code I could learn/get some pointers from.Edit: I am using .NET 3.5
View 1 Replies
Jun 9, 2010
I'm using Visual Studio 2008 and SQL Server 2008 Developer to create a website.
I'm trying to test a connectino to a local database in my computer.
What I did is create a connection string in the webconfig file like this:
[Code]....
Then I want to call that connection string like this in the default.aspx.cs file I write the following code:
[Code]....
I'm not getting any error or warning in any of the code but when I run the page I throws me an error telling me:
The connectionstring property has not been initialized.
If I run with debug on it shows this:
[Code]....
Line 22 in red.
I don't know what I'm doing wrong since VIsual Studio does not tell me there is an error, it just seems like it cannot make the connection.
View 4 Replies
May 29, 2010
How can I make a call on a function of an external javascript file?
More specific...
In the head tag i have
<script type="text/javascript" src="JScript/FontSize.js"></script>
The external javascript file, (that i would like to call) FontSize.js contains the following functions.
[code]...
Of course nothing works as it should because, i do not know how to make the call to a function to an external js file
View 1 Replies
Feb 1, 2010
i have the same prblmi have a class file in app_code/fol1/fol2/class1.vbbut when i call it as dim x as new class1 i am not getting itshld the class file be placed in app_code folder or outsideactually i had creatd the namespace but i am not able to import i
View 8 Replies
Apr 27, 2010
I want to know if there is a way to call a content page Sub routine from a master page. Is this possibile or I must create a class?
View 16 Replies
Feb 14, 2011
I was just wondering, let's say I created a Method that is in a partial class in App_Code, and this Method would replace the same type of Method that would otherwise be in many files, and so, since it would be called from many files and would probably be called and used very frequently especially because of this. Would this overload this class? I'm not saying what would most likely happen, I'm just asking if it would be even remotely possible?
View 2 Replies
Oct 5, 2010
I have an ImageButton and a FileUpload controls in a child page of a master page. I would like to achieve something like when user click on the ImageButton, the browse file window will pop-up like what we did when we click on the Browse button of the FileUpload control.
How can call the browse file window of the FileUpload control when i click on the ImageButton?
View 1 Replies
Apr 25, 2010
i am using ajax.beginfrom on my view and want call a jquery function for OnSuccess. if i put the function in scricp tag it is correct but if i call the function from js file the function dosn't run.
what's the problem?
[Code]....
View 2 Replies
Feb 8, 2011
I've done a search and read a few things, All i'm trying to do is set a variable in the code file and call it in the page file asp.net vb.net 3.5. I've tried like this in the code file:
[Code]....
And in the design part of the page:
[Code]....
But it says that name isn't declaired. What am I doing wrong?
View 7 Replies
Mar 8, 2011
$.ajax(
{
type: "POST",
url: "Default.aspx/GetAge",
data: "{}",[code]...
Right now it reports the following error: "Cannot locate the resource". I figure that I am specifying the url incorrectly. This javascript is in an external file located in the same directory as Default.aspx .
View 1 Replies
Dec 2, 2010
Is there a way to call a public function from a class?
[code]....
View 4 Replies
Nov 5, 2010
I have a page called main.apsx and on that page I have a multiview with a couple of view panes. In main.aspx I also have an have a buttons.ascx file with a few link buttons. When these buttons are clicked I want them to show the the selected view panels in multiview in main.aspx.
I cant seem to figure out where to put the action code for the link buttons. Do I put it into my buttons.ascx.cs file or into main.aspx.cs? I presume in buttons.ascx.cs, but if I do that, how will the buttons find the multiview control?
This is the code for on of my buttons in buttons.ascx.cs
[Code]....
When I run it like this is gives an error
The name 'MultiView1' does not exist in the current
The name 'View1' does not exist in the current
View 2 Replies
May 4, 2010
I'm developing a web application using EF4, POCO's, WCF Data Services and the presentation tier (HTML, CSS, JavaScript, Ajax - NO WebForms). For security I would like using ASP.NET Membership Provider (Authentication Service): from a *.htm file calling the AuthenticationService. I executed aspnet_regsql.exe (to create the necessary database tables) and modified my web.config file:
<configuration>
<system.web>
<roleManager enabled="true" />
[code]...
View 1 Replies
Apr 15, 2010
I've just setup a new site on my IIS6 and I'm experiencing the following problem:
I can run normal HTML pages, but no .aspx files. If I call the aspx page directly I get a 404 - file not found - error message. This only happens with .aspx files.
View 5 Replies
May 24, 2010
I have a problem, I have created a website that is run on local host database is make in 2005 sql server
now i am using sql 2008 and visual studio 2010 , I attach the sql 2005 mdf file in sql 2008 server and run it working correctly when we host it then it is not working
problem gives "NT NETWORK SERVICE FAILED "
how we can convert the sql 2005 mdf file to sql 2008 file.
View 2 Replies
Aug 29, 2010
I have a cascading dropdown. After the dropdown is populated(it is in another file) i would like to return back to the original form where the control is placed. is there anyway of doing it
View 4 Replies
Dec 6, 2010
I have inherited a project which has many .ddl file's, I just need to get access one of them. I have managed to amend the .ddl file by using Reflector which outputted all the files into a specific folder on my C: drive. So now I have a bunch of files outside of my project. How can i recompile these files to create the new .ddl file so that i can overwrite the old one in my project? I have tried adding the new files as a new class project and building the site again, but no luck.
View 3 Replies