救命呀,看不懂得用户控件变量取值的问题
公司要求修改一些功能,接手软件公司的源代码后,有一个用户控件的代码看不懂。大概如下。
Public type As String = "norm"
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If type = "style" Then
styleln = "#"
ElseIf type = "func" Then
funcln = "#"
ElseIf type = "tech" Then
techln = "#"
ElseIf type = "spec" Then
specln = "#"
ElseIf type = "opt" Then
optln = "#"
End If
End Sub
html 文本如下
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="menu_product_norm.ascx.vb" Inherits="tjm2.menu_product_norm" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<a href='<%=styleln%>'><img src='<%=style%>'></a> <img src="img/spacer_white.gif" width="20">
<a href='<%=funcln%>'><img src='<%=func%>'></a> <img src="img/spacer_white.gif" width="20">
<a href='<%=techln%>'><img src='<%=tech%>'></a> <img src="img/spacer_white.gif" width="20">
<a href='<%=specln%>'><img src='<%=spec%>'></a> <img src="img/spacer_white.gif" width="20">
<a href='<%=optln%>'><img src='<%=opt%>'></a> <img src="img/spacer_white.gif" width="20">
看不懂变量type从哪里得到的值,大家说说,type可能会从哪里的到值得,源代码是2005开发的,我在2003上打开的。