Link to home
Start Free TrialLog in
Avatar of kfasick
kfasickFlag for United States of America

asked on

Make "This is a private computer" the default in RDWeb.

I’m setting up RDWeb in Windows 2008 R2 remote desktop services.  On the default web page where it gives the user a choice between “Public” or “Private” computer, is there a way to make the “This is a private computer” the default, or remove the choices and make it the default?
Avatar of Brad Howe
Brad Howe
Flag of Canada image

Hi,
1. Open c:\windows\Web\RDWeb\Pages\en-us\Login.aspx in notepad
2. Search for "checked"
3.  Modify the radio defaults for rdoPlbc to be rdoPrvt.
Sample excerpt from Login.aspx
    const string L_PublicLabel_Text = "This is a public or shared computer";
    const string L_PrivateLabel_Text = "This is a private computer";
.......
       <label><input id="rdoPblc" type="radio" name="MachineType" value="public" class="rdo" onclick="onClickSecurity()" /></label>

                                <label><input id="rdoPrvt" type="radio" name="MachineType" value="private" class="rdo" onclick="onClickSecurity()"  checked /></label>
 
 Cheers, Hades666
Avatar of kfasick

ASKER

Worked great.  Is there any way to remove the choices and just set it to private?
Remove the input and label from the page OR comment it out with <!-- and end it with --> -Hades666
Sorry, I was on the road.
Here you go. I wouldn't remove them, but make one the DEFAULT and then just hide them like such.
Login.aspx
<input id="rdoPblc" type="radio" name="MachineType" value="public" class="rdo" onclick="onClickSecurity()" visible="False" />

<label><input id="rdoPrvt" type="radio" name="MachineType" value="private" class="rdo" onclick="onClickSecurity()" checked visible="False" /></label>  

Cheers, Hades666
Avatar of kfasick

ASKER

I added the visible="False", but they are still displayed.
Yes,
That parameter is for a ASP RadioButton 2.0 object. This happens because it is an INPUT and not an asp:radiobutton object.
Syntax <INPUT> Attribute Specifications TYPE=[ text | password | checkbox | radio | submit | reset | file | hidden | image | button ] (type of input)
  NAME=CDATA (key in submitted form)
  VALUE=CDATA (value of input)
  CHECKED (check radio button or checkbox)
  SIZE=CDATA (suggested number of characters for text input)
  MAXLENGTH=Number (maximum number of characters for text input)
  SRC=URI (source for image)
  ALT=CDATA (alternate text for image input)
  USEMAP=URI (client-side image map)
  ISMAP (server-side image map)
  ALIGN=[ top | middle | bottom | left | right ] (alignment of image input)
  DISABLED (disable element)
  READONLY (prevent changes)
  ACCEPT=ContentTypes (media types for file upload)
  ACCESSKEY=Character (shortcut key)
  TABINDEX=Number (position in tabbing order)
  ONFOCUS=Script (element received focus)
  ONBLUR=Script (element lost focus)
  ONSELECT=Script (element text selected)
  ONCHANGE=Script (element value changed)

To get around this, you would need to use javascript to hide it.
-Hades666
ASKER CERTIFIED SOLUTION
Avatar of Brad Howe
Brad Howe
Flag of Canada image

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
Avatar of oneprospect
oneprospect

This no longer seems to work in Server 2012. XSL/XML requires is be checked="checked" but that still does not make it the default.

Searched everywhere in all .xsl and .aspx files, but can't find what is making "Public" the default.

Any thoughts?