简体   繁体   中英

files name in asp.net and vb.net

I have .aspx and .vb files. The name of it are: SA_Setup.aspx and SA_Setup.vb.

The 1st 10 lines of the code in SA_Setup.aspx file is:

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="SA_Setup.aspx.vb" Inherits="SA_Setup" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link id="Link2" rel="Stylesheet" href="~/Common/OrgSelfAssessment.css" type="text/css"
        media="screen" runat="server" />
</asp:Content>

And the 1st 10 lines of code in SA_Setup.aspx.vb file is:

Imports System.Data
Imports GlobalModule

Partial Class SA_Setup
    Inherits System.Web.UI.Page

    Dim dalGM As GlobalModule
    Dim dalSelfAssessment As New SelfAssessmentSetUp
    Dim dalSurveyAdmin As New SurveyAdmin
    Dim dalClientAdmin As New ClientAdmin


    Protected Overrides Sub InitializeCulture()
        Try
            Dim strCul As String : strCul = Session("Culture")
            System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo(strCul)
            System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo(strCul)
        Catch ex As Exception
            Response.Redirect("~/Error/ErrorPage.aspx?type=SessionTimedOut&ui=" & Request.QueryString("ui"), True) : Exit Sub
        End Try
    End Sub


Now, I have changed the files name to SA_Setup_MPHLB.aspx and SA_Setup_MPHLB.aspx.vb . I am wondering what changes do I need to do in the codes above after changing the files name. As per my understanding, I have made the following changes:

In .aspx file (SA_Setup_MPHLB.aspx):

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="SA_Setup_MPHLB.aspx.vb" Inherits="SA_Setup_MPHLB" %>

In .aspx.vb file (SA_Setup_MPHLB.aspx.vb):

Partial Class SA_Setup_MPHLB

Just checking if the changes I have did is right or is there any place I have to do the changes ?

If you are able to successfully rebuild the project after name changes, you may not need to do anything else. If you are getting any error, it will surely suggest you what to do next.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM