Link to home
Start Free TrialLog in
Avatar of pauledwardian
pauledwardian

asked on

html

I have never worked in .net or html environment. I am trying to add a button on a html page that runs a vbscript. Also, I need to add a link on html that would only allow certain people have access to the link. Is there anyway that link would only let the domain admins to open it?

Thanks,
Paul
Avatar of jagrut_patel
jagrut_patel
Flag of India image

For Button that runs VBScript look this link. It also shows example so should be easy for you to copy that in your web-page.
http://www.csidata.com/custserv/onlinehelp/vbsdocs/vbs9.htm

For admin specific link you will need to write some ASP.NET code.

In your ASPX web-page put the following,

<asp:LinkButton ID="AdminLink" Text="Only for Admin" runat="server" Visible="false"></asp:LinkButton>

In your code-behind (aspx.cs) of that page write

protected void Page_Load(object sender, EventArgs e)
{
    bool isAdminUser = false;
    //Put code that determines whether current user is Admin. If user is Admin set isAdminUser = true;            
    AdminLink.Visible = isAdminUser;
}

Open in new window


HTH!

Avatar of djpazza
djpazza

Is it asp.net your are after or vb script asp?
Avatar of pauledwardian

ASKER

Bacially, I need it to run a vbscript. But only lets the domain admins to run it from the html.
ASKER CERTIFIED SOLUTION
Avatar of djpazza
djpazza

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks