You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InVB.net,aclasscancontainamethodwiththesamenameastheclass.Letscallthisclass'someclass'. In the aspx file, a reference is made to this file using <%@ PageLanguage="vb"AutoEventWireup="false"CodeBehind="SomeClass.aspx.vb"Inherits="SomeClass"ViewStateMode="Disabled" %>withsomeclass.aspx.vblookinglikethis:PublicClassSomeClassInheritsBaseWebPagePrivateSubSomeClass()'do nothingEndSubEndClass
Erroneous output
Whenconverted to c#, the method name can't be the same as the classname,so the converter changes the classname,and appends 'Type',resultingin:publicclass SomeClassType :BaseWebPage{privatevoidSomeClass(){//do nothing}}
However, the attributeInherits="SomeClass"in the aspx file should also be changed into Inherits="SomeClassType", which does not happen currently. This won't be picked up during compilation,only at runtime,where the page will throw a 500 error,because the class-behind can't be found.
Currently, the aspx-file is not touched at all: the reference to the vb-codehind stays unchanged (instead it should be changed to .cs, but this doesn't actually impact the application so just mentioning this as a side-note).
Expected output
Musthave: In the aspx-files, it should have it's Inherits-attribute changed if the classname changes.
Should have: In the aspx-files, change the CodeBehind value from.vb to .cs :)
Details
Product in use: e.g. both
Version in use: e.g. 9.2.5.0
Did you see it working in a previous version: no
The text was updated successfully, but these errors were encountered:
VB.Net input code
Erroneous output
Expected output
Details
The text was updated successfully, but these errors were encountered: