Microsoft Content Management Server - list domains

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > March 2005 > list domains





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author list domains
Javier Ruiz

2005-03-22, 6:03 pm


Hello Everyone

I want to list the domanis in a dorp down list box but in a ASP.Net web
login form i have this code
<FORM method="post" action="ManualLoginSubmit.asp">
<TABLE>
<TR>
<TD>Domain</TD>
<TD><SELECT name="NR_DOMAIN" id=txtInsDomains IDS size="1">
<%
Dim arrDomains, nCount, strDomain
arrDomains = Autosession.GetConfiguredDirectories(False)
'Output list of domains into drop-down menu.
For nCount = 0 to UBound(arrDomains)
'Set the value of each option to the domain name.
strDomain = arrDomains(nCount)
Response.Write("<OPTION value='" _
+ strDomain + "'>" + strDomain + "</OPTION>")
Next
%>
</SELECT></TD>
</TR>
<TR>
<TD>User Name</TD>
<TD><INPUT name="NR_USER"></INPUT></TD>
</TR>
<TR>
<TD>Password</TD>
<TD><INPUT name="NR_PASSWORD" type="password"></INPUT></TD></TR>
<TR>
<TD colspan="2"><INPUT type="submit" value="Continue"></TD>
</TR>
</TABLE>
but i confused, about how can i implement in a VB.Net login form, in code
behind.
jawadak@gmail.com

2005-03-29, 6:19 pm

Just add a literal control with id lets say ltCode in place of :
<%
Dim arrDomains, nCount, strDomain
arrDomains =3D Autosession.GetConfiguredDirec=ADtories(False)
'Output list of domains into drop-down menu.
For nCount =3D 0 to UBound(arrDomains)
'Set the value of each option to the domain name.
strDomain =3D arrDomains(nCount)
Response.Write("<OPTION value=3D'" _
+ strDomain + "'>" + strDomain + "</OPTION>")
Next
%>

and then in the code behind pre render event set the literal control
Text proper to tthe String Builder
I am just doing it fast you can correct the syntax errors:


Dim StringBuilder sb;
Dim arrDomains, nCount, strDomain
arrDomains =3D Autosession.GetConfiguredDirec=ADtories(False)
'Output list of domains into drop-down menu.
For nCount =3D 0 to UBound(arrDomains)
'Set the value of each option to the domain name.
strDomain =3D arrDomains(nCount)
sb.Append("<OPTION value=3D'" _
+ strDomain + "'>" + strDomain + "</OPTION>")
Next=20
ltCode.text =3D sb.ToString();

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com