AndyDale
Member
Hi, I'm trying to create a Client Side User Control in VB.NET that can be used in the IE7 browser and can read the current UserName and ComputerName and display it on the WEB page.
I've created a User Control called MyDetails with two labels and added the following code:
Then I built the control as MyDetails.dll
I then created a Web Application Default.htm and added the following code to the body tag.
I copied the MyDetails.dll into the same directory as Default.htm
When I ran the Default.htm the browser displayed
If I replace the
with
Then when I ran the Default.htm again the browser displayed
I'd appreciate any helpful suggestions
I've created a User Control called MyDetails with two labels and added the following code:
VB.NET:
lblComputerName.Text = My.Computer.Name
lblUserName.Text = My.User.Name
I then created a Web Application Default.htm and added the following code to the body tag.
HTML:
<div>
This is my user control.
<object id="MyDetails" classid="http:MyDetails.dll#MyDetails.Details" VIEWASTEXT>
</object>
</div>
When I ran the Default.htm the browser displayed
and nothing else. Where have I gone wrong?This is my user control.
If I replace the
VB.NET:
lblComputerName.Text = My.Computer.Name
lblUserName.Text = My.User.Name
with
VB.NET:
lblComputerName.Text = "My Server"
lblUserName.Text = "My User Name"
Then when I ran the Default.htm again the browser displayed
So I know the code is sort of working.This is my user control.
My Server
My User Name
I'd appreciate any helpful suggestions