.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Inherits HTMLDocumentEvents

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application
 

I'm translating from C# to vb.net and this flags as an error:  Classes can only inherit from other classes.

on this 3rd line:

Namespace Microsoft.Expression.Web.AddIn
	Public MustInherit Class DocumentEventHandler
        Inherits HTMLDocumentEvents
		Implements IDisposable

Any idea where this class is?  Do I need to import

This is the whole code

 

'---------------------------------------------------------------------------
'
' Copyright (C) Microsoft Corporation.  All rights reserved.
' 
'
' Description:
'      AddInDocEvent handler - Subclassed from DocumentEventHandler with
'      the document events the add-in cares about overridden
'
'---------------------------------------------------------------------------


Imports ExpressionWebAddInTemplate_forVB.My
Imports Microsoft.Expression.Web.Interop.Designer


Namespace Expression_Web_4_AddInVB
    Class AddInDocEventHandler
        Inherits DocumentEventHandler
        Public Property Connection() As Expression_Web_4_AddInVB.Connect
            Get
                Return m_Connection
            End Get
            Set(ByVal value As Expression_Web_4_AddInVB.Connect)
                m_Connection = value
            End Set
        End Property
        Private m_Connection As Expression_Web_4_AddInVB.Connect

   


View Complete Post


More Related Resource Links

Make sure that the class defined in this code file matches the 'inherits' attribute, and that it e

  

Here is the page directive for the page that throws the error:

<%
@ Page language="c#" Inherits="University.AspNet.Index" CodeFile="Index.aspx.cs" %>

The code behind file Index.aspx.cs starts like this:

using University.Framework.UI;

namespace University.AspNet

{
      
public partial class Index : University.Framework.UI.HomePage

The code behind is extending this HomePage class, which is in turn an extenstion of another class University.Framework.UI.Page, which extends the System.Web.UI.Page class.

Am I misusing the I

Extra file is included on the Page directive inherits =

  

Hi;

I am trying to understand where the additional file name is coming from in my Page directives Inherits

attribute like so :

inherits ="Track_Milestones2, App_Web_techsrvcs_track_milestones2.aspx.cdcab7d2"

Is the result of this app being published on my local server at one time or could this

page have been compiled on a server ?

Thanks for your insights !


'inherits' attribute, error

  
Hey guys. I'm getting this error. Source Error:  Line 1:  PartialClass secure_home Inherits System.Web.UI.Page Line 2:  Protected Sub GridViewZ_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Line 3:      If e.CommandName = "Add" ThenSource Error:Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). Line 1:  PartialClass secure_home Inherits System.Web.UI.PageLine 2:  Protected Sub GridViewZ_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)Line 3:      If e.CommandName = "Add" ThenMy CodeFile has this at the top:PartialClass secure_home Inherits System.Web.UI.PageProtected Sub GridViewZ_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)My aspx file has this at the top:<%@ Page Language="VB" AutoEventWireup="false"  Codefile="a_Order_Details.aspx.vb" Inherits="secure_home"%>Any idea how to solve this? 

Creating Custom Control by Inherits BindingNavigator - How to Add ToolStripItem Programmatically

  

I'm creating a custom control which inherets the BindingNavigator.

I need do add one ToolStripButton at specific posistion (9 element) on the ToolStrip of the BindingNavigator.

So, I wrote the following code:

Dim
 tsb As
 New
 ToolStripButton
With
 tsb
 .Name = "BindingNavigatorUndoChanges"

 .Image = My
.Resources.UndoChanges
 .ToolTipText = "Undo changes"

End
 With

Me
.Items.Insert(9, tsb)

My question is: In which event of the custom control should I put this code?

Many thanks for any kind of help.


Ciro

Web Service to inherit from a Custom Base Class that inherits System.Web.Services.WebMethod instead

  

Hi All,

Recently, I tried to get my Web Service class to inherit from a custom base class that inherits from System.Web.Services.WebMethod instead of the System.Web.Services.WebMethod directly.

However, I've been getting Error 500.

Public Class Service1
    Inherits BaseClass
    <System.Web.Services.WebMethod()> _
    Public Function GetSessionID() As String
        GetSessionID = Me.Session.SessionID
    End Function
End Class

 

public class BaseClass
    Inherits System.Web.Services.WebService

    public property Property1 as string
    public property Property2 as string

End Class

 

Please kindly assist.

Thank you in advance.

Warmest Regards,

leroylll



class defined in this code file matches the 'inherits' attribute

  

Hello am very new to asp and web programming

am trying to do a login page that reads from an sql database ... so i found a c# code and when i compile it and run it with visual studio

i get this error:


Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).

Source Error:


Line 1:  using System;
Line 2: using System.Data;
Line 3: using System.Configuration;


and here is my full cs code in the file login.aspx.cs


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.We

Report server error "Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="Microsoft.Report

  
Hi Team,
I facing parse error, application used to work week earlier and then it started showing error. Can some one help me? I tried following steps provided with similar error postings but of no uses.


Parser Error body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

Server Error in '/Reports' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and

Nested table 'link' which inherits its namespace cannot have multiple parent tables in different n

  

Does anyone know what I need to do to get past this error?

The error is "Nested table 'link' which inherits its namespace cannot have multiple parent tables in different namespaces."

I get the error on this line:

dscte.ReadXml(xtr)

 Protected Sub lstOpens_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim ConnectStr As String = _
        ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString

        'Try
        Dim ctu As String = GetCTU()
        Dim ctp As String = GetCTP()
        'check if user has ct's
        If String.IsNullOrEmpty(ctu) Then
            Exit Sub
        End If
        If String.IsNullOrEmpty(ctp) Then
            Exit Sub
        End If

        'this returns an xml info for selected Campaign (email)

        Dim sUri As String = "https://api.constantcontact.com" & Me.lstOpens.SelectedValue.ToString()
        Dim sAPIKey As String = "/////"

        'setup httpWebReqeust to send the request
        Dim address As New Uri(sUri)
        Dim theRequest As HttpWebRequest = TryCast(WebRequest.Create(address), HttpWebRequest)
        theRequest.Credentials = New NetworkCredential((sAPIKey & "%" & ctu), ctp)

        
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend