我有一个已发布并在服务器中运行的 Web 应用程序。我有aspx文件,但没有.vb文件。我需要在应用程序中编辑单个页面。如何访问.vb文件?或者更好地说,我怎样才能在应用程序中编辑我想要的部分?
编辑: 这是我的 aspx 文件:
<%@ page language="VB" autoeventwireup="false" inherits="UrunRapor, App_Web_hfev-r-q" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v8.3, Version=8.3.6.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %><%@ Register assembly="DevExpress.Web.ASPxGridView.v8.3, Version=8.3.6.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v8.3, Version=8.3.6.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v8.3.Export, Version=8.3.6.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dxwgv" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Ürün Detaylı Rapor</title>
<script language="javascript">
window.moveTo(0, 0);
window.resizeTo(screen.availWidth, screen.availHeight);
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="font-size: 9pt; width: 474px; font-family: Calibri">
<tr>
<td style="width: 100px; height: 22px">
Ay</td>
<td style="width: 100px; height: 22px">
<asp:DropDownList ID="cboMonth" runat="server" BackColor="#FFFFC0" Font-Bold="True"
Font-Names="Calibri" Font-Size="9pt">
<asp:ListItem Selected="True" Value="%%">[..]</asp:ListItem>
<asp:ListItem Value="1">January</asp:ListItem>
<asp:ListItem Value="2">February</asp:ListItem>
<asp:ListItem Value="3">March</asp:ListItem>
<asp:ListItem Value="4">April</asp:ListItem>
<asp:ListItem Value="05">May</asp:ListItem>
<asp:ListItem Value="06">June</asp:ListItem>
<asp:ListItem Value="07">July</asp:ListItem>
<asp:ListItem Value="08">August</asp:ListItem>
<asp:ListItem Value="09">September</asp:ListItem>
<asp:ListItem Value="10">October</asp:ListItem>
<asp:ListItem Value="11">November</asp:ListItem>
<asp:ListItem Value="12">December</asp:ListItem>
</asp:DropDownList></td>
<td style="width: 100px; height: 22px">
Yıl
</td>
<td style="width: 100px; height: 22px">
<asp:DropDownList ID="cboYear" runat="server" BackColor="#FFFFC0" Font-Bold="True"
Font-Names="Calibri" Font-Size="9pt">
<asp:ListItem Selected="True" Value="%%">[..]</asp:ListItem>
<asp:ListItem Value="2007">2007</asp:ListItem>
<asp:ListItem Value="2008">2008</asp:ListItem>
<asp:ListItem Value="2009">2009</asp:ListItem>
<asp:ListItem Value="2010">2010</asp:ListItem>
<asp:ListItem>2011</asp:ListItem>
<asp:ListItem>2012</asp:ListItem>
<asp:ListItem>2013</asp:ListItem>
<asp:ListItem>2014</asp:ListItem>
<asp:ListItem>2015</asp:ListItem>
</asp:DropDownList></td>
<td style="width: 100px; height: 22px">
<asp:Button ID="Button1" runat="server" Font-Bold="True" Font-Names="Calibri" Font-Size="9pt"
Text="Sorgula" /></td>
<td style="width: 100px; height: 22px">
<asp:Button ID="Button2" runat="server" Font-Bold="True" Font-Names="Calibri" Font-Size="9pt"
Text="Excel'e aktar" /></td>
<td style="width: 100px; height: 22px">
<asp:Button ID="Button3" runat="server" Font-Bold="True" Font-Names="Calibri" Font-Size="9pt"
Text="PDF dosyasına aktar" Width="123px" /></td>
</tr>
</table>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CRRConnectionString %>">
<SelectParameters>
<asp:ControlParameter ControlID="cboMonth" Name="Month" PropertyName="SelectedValue" />
<asp:ControlParameter ControlID="cboYear" Name="Year" PropertyName="SelectedValue" />
</SelectParameters>
</asp:SqlDataSource>
<dxwgv:aspxgridview id="dgCRR" runat="server" datasourceid="SqlDataSource1">
<Settings ShowFilterRow="True" ShowFilterRowMenu="True" ShowFilterBar="Visible"
ShowGroupedColumns="True" ShowGroupPanel="True"></Settings>
<SettingsPager Visible="False" PageSize="1000" Position="TopAndBottom"></SettingsPager>
</dxwgv:aspxgridview>
<dxwgv:ASPxGridViewExporter ID="ToExcel" runat="server">
</dxwgv:ASPxGridViewExporter>
</form>
</body>
</html>
她是我想使用的 .vb 文件
Imports System.Globalization
Partial Class UrunRapor
Inherits CRR.RequestBase
Dim SelCmd As String
Dim MyUser As String
Dim dtreg As Data.DataTable
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
MyUser = Request.ServerVariables.Get("LOGON_USER")
If Not Page.IsPostBack Then
Dim dareg As Data.SqlClient.SqlDataAdapter = New Data.SqlClient.SqlDataAdapter
dareg.SelectCommand = select_User(Request.ServerVariables.Get("LOGON_USER"))
dareg.SelectCommand.Connection = cnn
dtreg = New Data.DataTable
dareg.Fill(dtreg)
If dtreg.Rows.Count = 0 Then
Response.Redirect("NotAuthRep.aspx")
End If
'Exit Sub
'dgCRR.DataBind()
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
FillGrid()
End Sub
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
FillGrid()
ToExcel.FileName = "CRR-Product.pdf"
ToExcel.WritePdfToResponse("CRR-Product.pdf")
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
'ToExcel.FileName = "CRRNew"
'ToExcel.DataBind()
FillGrid()
ToExcel.GridViewID = "dgCRR"
ToExcel.WriteXlsToResponse()
End Sub
Protected Sub FillGrid()
SelCmd = "SELECT tblCRRProductDetails.CRRId, tblCRRProductDetails.ProductCode, tblCRRProductDetails.ProductName, tblCRRProductDetails.Batch, tblCRRProductDetails.ExpireDate, tblCRRProductDetails.Qty, tblCRRProductDetails.SalesUnit, tblCRR.CrrCaptureDate, tblCRR.RegistrarName, tblCRR.CustomerCode, tblCRR.CustomerName, tblCRR.Channel, tblCRR.ClaimerName, tblCRR.ClaimerAddress, tblCRR.ClaimerPhone, tblCRR.ClaimerMail, tblCRR.CaseDetails, tblCRR.RsDeptName, tblCRR.ReasonName, tblCRR.RsPerName, tblCRR.ExpecRsDay, tblCRR.ExpecRsDate, tblCRR.RsDescription, tblCRR.ResolutionDate, tblCRR.ClaimResult, tblCRR.ActionPlan, tblCRR.ClosedPerName, tblCRR.ClosingDate,tblCRR.Status FROM tblCRRProductDetails INNER JOIN tblCRR ON tblCRRProductDetails.CRRId = tblCRR.CrrID WHERE (MONTH(CrrReceiveDate) LIKE '" & cboMonth.SelectedItem.Value & "') AND (YEAR(CrrReceiveDate) LIKE '" & cboYear.SelectedItem.Value & "')"
SqlDataSource1.ConnectionString = "My Connection String"
SqlDataSource1.SelectCommand = SelCmd
dgCRR.DataBind()
End Sub
End Class