简体   繁体   English

asp.net和vb.net中的文件名

[英]files name in asp.net and vb.net

I have .aspx and .vb files. 我有.aspx和.vb文件。 The name of it are: SA_Setup.aspx and SA_Setup.vb. 它的名称是:SA_Setup.aspx和SA_Setup.vb。

The 1st 10 lines of the code in SA_Setup.aspx file is: SA_Setup.aspx文件中的代码的前10行是:

<%@ 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: SA_Setup.aspx.vb文件中的前10行代码为:

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 . 现在,我将文件名更改为SA_Setup_MPHLB.aspxSA_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): 在.aspx文件(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): 在.aspx.vb文件(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. 如果您遇到任何错误,它肯定会建议您下一步该怎么做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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