VS 2008 Cannot Call Class Other Than Default?

Sep 6, 2010

I have created one class and use in default.aspx page working well. But when i add new aspx page and trying to call there i am getting error.

Code:
Parser Error Message: 'project1._Inquiry' is not allowed here because it does not extend class 'System.Web.UI.Page'.
Below code is from default.aspx header.

k Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="project1._Default" %>

Below is the code of second file where error appear.

ss Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Inquiry.aspx.vb" Inherits="project1._Inquiry" %>

View 3 Replies


Similar Messages:

Mvc - Can Set A Custom Class As The Default Base Class For Controllers In MVC3

Feb 15, 2011

I'd like to inherit all my controllers from a custom base class that I write myself. I can change the line every time I add a new controller, but it would be nicer if I could somewhere specify the default value that gets set there. That way I wouldn't need to worry about forgetting this, and other people who get added to the project later on would have an easier time.

View 3 Replies

How To Jquery Call A Other Call Function Other Class Is Not Static

Sep 16, 2010

how to jquery call a other call function other class is not static

[WebMethod]
public static bool Verify(string username, string password)
//Do your logic with username, password here
//I am just checking with admin/admin credentials
Console.WriteLine("Ritu");
[code]...

View 2 Replies

C# - How To Call Class & Method From A Button In Another Class

Jun 24, 2010

I have a WindowsForm that has a DataGridView that shows output of my app. The class with the button is DriveRecursion_Results.cs. I want it so that once the button is pushed by the user, my method FileCleanUp() in my SanitizeFileNames class is called. I'm not quite sure how to do this though.Here is the code for both classes:

public partial class DriveRecursion_Results : Form
public DriveRecursion_Results()
InitializeComponent();
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
[code]...

View 1 Replies

Security :: Not Extending MembershipProvider Class And Putting All This Methods In Some Unique Class And Call Its Methods Then?

Sep 16, 2010

I am beginner in web applications development. I started one little project and host it on source forge "https://homoco.svn.sourceforge.net/svnroot/homoco". And I started implementing authentication in this application to learn how it works. From my experience people never use out of the box things so I want to implement this stuff alone (like in real world projects). So some questions:

1) Is there any reason to use membership out of the box? To use database table schema, stored procedures etc. that tool generate for developer. I think that this lower control over code and I decided to implement it my self. I don't know if I am right.

2) Is my approach in this demo project good or bad (if someone have time I like to do just a little code review)? I created database based on business rules. Not using database schema that membership provider require. Extend "MembershipProvider" class to satisfy my needs. Implement queries to database myself.

3) Now, this question is a little wired but I have to ask it. If we make custom Membership Provider and do sql queries alone, implement all MembershipProvider class methods ourselves, and in application use Membership.blabla() why is this approach different from not extending MembershipProvider class and putting all this methods in some unique class and call its methods then? I hope that someone understand what I ask here.

I am sorry for three questions, but I really trying to find the best way to implement this feature in my demo project like it is a real world application.

View 3 Replies

What's The Default Access Modifier Of A Class

Aug 17, 2010

What is the default access modifier of a class?

View 5 Replies

Web Forms :: Why Default ASPX Page Call Automatically

Jul 28, 2010

I have created a web application. I have a page "Default.aspx" and some other page say"test.aspx". In test.aspx, I am setting some values in a collection object and then setting this object in session. I am not getting but somehow during execution of test.aspx, the default.aspx gets called where the session containing object gets reset. Its very important for me to know whey this default.aspx gets called even I am not making any call to it. I have other pages also like a.aspx,b.aspx, c.aspx, d.aspx and many more. All other pages work fine.

View 5 Replies

Web Forms :: Class Cannot Be Indexed Because It Has No Default Property?

Dec 6, 2010

What am I doing wrong here?

Me("Label" & CStr(i)).Text = strURI.Substring(strURI.ToString().LastIndexOf("/") + 1) & ": " & intCount.ToString()

[Code]....

I get an error on Me; it indicates that it cannot be indexed because it has no default property

View 5 Replies

Call GetLocalResource In Another Class?

Mar 8, 2011

So I have Test1.aspx, Test1.aspx.vb. The LocalResource files, in the App_LocalResources folder, Test1.aspx.resx and Test1.aspx.es.resx. I also have a class called TestTheData.vb in the App_Code folder.

Now what I want to do is call GetLocalResource("stringObjRes").ToString in the TestTheData.vb class. The method however is not showing up in Intellisense. When I try to type manually, I get the error lines in my code.

I've imported:

Globalization
Threading
Threading.Thread
Web
Web.UI.Page.

View 1 Replies

Web Forms :: Remove Default Style And Class For Menu?

Nov 23, 2010

I've uppgraded to version 4 of framework and notice that menucontrol is now able to render as <ul><li>, witch is perfect. But I notice that it adds a style element and set class for each node.

renderd page html

[Code]....

Is there a way to remove this so I can set my own style?

View 2 Replies

WebMatrix :: How To Change The Default Page Base Class

Aug 16, 2010

I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.

View 3 Replies

Error Referencing A Class Method In Default.aspx.cs?

Apr 8, 2010

Getting error when referencing a public method of Class1.cs (not in App_Code) in Default.aspx.cs.

View 5 Replies

Web Forms :: How To Call A Class Into Page_load

Sep 7, 2010

I'm trying to call a base class specifically; Release class into a Page_load method.The release class is linked to a baseclass which contains a method Dataset GetresultHow do i call from the release class into the page load and use GetResult.

View 12 Replies

Web Forms :: How To Call A Routine From A Class

Apr 20, 2010

I have a web form with lots of code behind a button. I want to create a class, put all the code form the button into the class. But how do you call routines in the button from the class?

View 2 Replies

MVC :: Call Html.Action() From Class?

Nov 7, 2010

I'm building a menu controller class and I have a database with the Controller/Action strings in it. I want to dynamically build a menu reading from the database and generating the URLs to use in the menu's <a href=''> HTML that the class renders. I can't use Html.Action() in my class. I've tried adding System. Web.Mvc, but this doesn't help. Is there a way to generate a page's URL when given the Controller and Action? Maybe referencing the MVC equivalant of HttpContext.Current like I used to do in WebForms?

View 3 Replies

Wrap A Database Call In A C# Class?

Feb 2, 2011

I would like to know how I can create a class that consists of my database connection and then how I can call that class within my C# code. Consider simple database call as follows,

SqlConnection conn = new SqlConnection(
"Data Source=InOrder_Play;server=play;user id=web;pwd=mypass;Application Name=myap .NET Cart;Persist Security Info=False;Connection Timeout=90");[code].....

View 7 Replies

Web Forms :: Call A Class With Javascript (c#)

Jan 18, 2010

I have a class that is referenced in my application. I use it in the codebehind, but now I need to call it from javascript. Is this possible, and how would I go about doing this? Say I have ClassABC. Within the class is method called getNames(). How do I call the method getnames() from javascript.

View 3 Replies

Web Forms :: How To Call A Class File

May 1, 2010

I wants to create a class file which contains the information about the salary calculation and call it on my page. hra,da,medical every thing is defined in percentage in that class and on my web page when i insert the basic salary in a textbox and click the button it will show the whole salary on a label.

View 2 Replies

Web Forms :: Call Css Class From Code Behind In VB?

Mar 12, 2010

I want to call css class that load background-image, font style,font size and so on...at the same time the code will load the button dinamically from database.. so that i want to put the CSS class, to change their image button when it default also when it hover.

View 2 Replies

Class Has NO Destructor Then Will GC Call Finalize () On It ?

Apr 15, 2010

If my class has NO destructor, an it goes out of scope. GC runs at certain time, now will it simply reclaim memory from my class OR will it call its destructor or Finalize () on it? And does the .net framework class like SQLConnection implement a destructor? I saw it has a Dispose () implementation but didn't see the destructor using "Go to definition".

View 6 Replies

Web Forms :: How To Call Namespace And Class In C#

May 7, 2015

I have create the following code

using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Text;
using System.Linq;
namespace ImageProperties

[Code] ....

But I did call it into my pages . I am using this but not find the ExifUtil class ?

ExifUtil.EXIFReader exif = new ExifUtil.EXIFReader(@"c:pathtoimage.jpg");
Console.WriteLine(exif[ExifUtil.PropertyTagId.EquipMake].ToString());
Console.WriteLine(exif[ExifUtil.PropertyTagId.EquipModel].ToString());

View 1 Replies

VS 2010 - Call Procedure From A Class

Jun 10, 2012

Inside my application I created the following class

Code:
Public Class clsProject

Public Sub AddData(ByVal cproject As string)
...
end Sub
end Class

I want to call this procedure from a sub in a form. So in the code behind file I wrote

Code:
Imports TextMgmt.clsProject
Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub btnAddData_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAddData.Click
Call clsProject.AddData(txtInput.text)
End Sub
End Class

I get the following design time error: Reference to a non-shared member requires an object reference.I thought making things Public would make them visible.

View 2 Replies

Difference Between Default Get Set In 2005 And Vs 2008

Mar 2, 2011

describe is there any difference between below two default get set properties in vs 2005 and vs 2008..Is there functionality same?

Code:
VS 2005 Syntax:
private string _strRegistrationID;
public string strRegistrationID
{
get { return _strRegistrationID; }
set { _strRegistrationID = value; }
}

View 3 Replies

Run VS.NET 2008 Web Application With Non-Default Browser?

Apr 26, 2010

I have Firefox set as my default browser, but I want to debug the ASP.NET Web Application with IE. Searching SO only shows replies to "Browse with ..." However, this doesn't start the debugger. How would I do this? I remember in an old Visual Studio setting the browser to start with the debugger, but I don't remember how - and where it is in VS 2008.

View 1 Replies

Way To Override And Inherit Default HttpApplication Class From Global.asax

Oct 19, 2010

am currently working on a web application, whereby I want to add code to the Application_BeginRequest method of the Global.asax file, without adding code to the Global.asax file, which sounds a little crazy, let me explain a bit more.If anyone has ever developed in sitecore before, they would have seen that the Global.asax file has empty methods, however it has 'using Sitecore;' and the global.asax file provided does not inherit from System.Web.HttpApplication.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved