asked on
Protected Property _UserID As String
Get
Return ViewState("userid")
End Get
Set(ByVal value As String)
ViewState("userid") = value
End Set
End Property
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
_UserID = User.Identity.Name
End Sub
Private Sub DDLTables_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLTables.DataBound
Dim sUserID As String = _UserID
PermittedAccessList_DS.SelectParameters(0).DefaultValue = sUserID
End Sub
ASKER
ASKER
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim p As New Parameter
p.Type = Data.DbType.String
p.DefaultValue = User.Identity.Name
PermittedAccessList_DS.SelectParameters.Add(p)
DDLTables.DataSource = PermittedAccessList_DS.Select(DataSourceSelectArguments.Empty)
DDLTables.DataBind()
End If
End Sub
ASKER
ASKER
The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications
TRUSTED BY
Open in new window
Otherwise remove it from the page and do it in code behind:
Open in new window