Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

How to call global variable

$
0
0

Hi experts,

I'm quite new in web development. Just want to know how to call my global variable in my aspx page(server side).

In my class page. Here's my code.

In my default.aspx page. Here's my code.

Imports Microsoft.VisualBasic

Namespace GlobalClass
    Public Class global_class
           Public oGridItem As DataGridItem
Public Web_Class As New WEBClass.ApplicationTool
Function GetGridItem(CtrlName As String, Optional gridItem As DataGridItem = Nothing) As Object
            Select Case IsNothing(gridItem)
                Case True
                    Return oGridItem.FindControl(CtrlName)

                Case False
                    Return gridItem.FindControl(CtrlName)

            End Select

        End Function
    End Class
End Namespace
Imports GlobalClass.global_class
Imports _DataBinding.databinding

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        Try
            

        Catch Exp As Exception 
Web_Class.SetMessage(Exp)
End Try
    End Sub
End Class

I just want to ask, how can I call the Web_Class variable in my default.aspx page?

Hope to hear positive feedback from you.

Thanks,


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>