|
The content page on my website is loaded thru an xml.
Now I want to change the text box as a label evrytime there is a value returned from database otherwise a textbox. Currently it always returns a text box as below.
- <element type="cdu:CDUText" binding="Shares/IndividualShare[i]/FirstName" id="CDUText_FirstIndv" width="Narrow">
<validator type="cdu:CDURequiredValidator" id="CDURequiredValidator_FirstIndv" message="First Name is required" />
</element>

|
|
|
|
|
|
Hello,
I have a drop down list with some items.
I need to disable some items (not selectable) from this list.
How can i implement this.
Please reply..
|
|
|
|
|
I would have thought it better not to show them in the first place: you should never show a user options that thay have no access to: what would be the point?
For example, knowing the user you could tailor the list items to suit rather than faffing around trying to hide unwanted items.Tychotics
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
we can not disabled the few items of listbox better not to fill them.... Rating always..... WELCOME
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
|
Hi,
I have a need to send out emails to all the people who are in a given group say "HR Department". I need to be able to get all the emails through a for loop and then as it retrieves I should send emails to them. Can some one please help me with the code how to get the emails out of AD.
this is what I came up with but not sure how to go about writing a for loop to get all the emails in the given group. I am having difficulty to send both the loginName and the group that I am interested in to the AD in the search.Filter.
public static string SendEmails(string loginName)
{
string Department = "HR Department"
string userName = ExtractUserName(loginName);
DirectorySearcher search = new DirectorySearcher();
search.Filter = String.Format("(SAMAccountName={0})", userName);
//search.Filter = String.Format("(SAMAccountName={FAY ImprovmentForm})", userName);
//LdapSearcher.Filter = string.Format("(&(objectClass=user)(department={0}))", Department);
//search.Filter = string.Format("(&(objectClass=group)(SAMAccountName=" + Department + "))", userName);
search.PropertiesToLoad.Add("cn");
search.PropertiesToLoad.Add("samaccountname");
search.PropertiesToLoad.Add("givenname");
search.PropertiesToLoad.Add("sn");
search.PropertiesToLoad.Add("mail");
SearchResult result = search.FindOne();
string samaccountname = (string)result.Properties["samaccountname"][0];
string givenname = (string)result.Properties["givenname"][0];
string surname = (string)result.Properties["sn"][0];
string email = (string)result.Properties["mail"][0];
if (result == null)
{
return "User doesn't Exist";
}
else
{
return "Emails sent successfully!";
}
|
|
|
|
|
|
I have a datagrid control with horizontal and vertical scrollbars. Both scrollbars work properly on Windows XP machine, but when I deploy/run site on a Windows 2003 Server, I don't see the horizontal scrollbar. Also, all the columns get rearranged automatically. Any ideas what's wrong?
Thanks!
|
|
|
|
|
Are you talking about Windows Application or Web Application ?
|
|
|
|
|
|
Hi
I am using JavaScript which to store and retrieve a value from a hiddenfield in order to set a position of a scrollbar on an asp.panel during postback. Unfortunately, during postback the value doesn't seem to be set, and I can't see why.
Here is my code:
function setScroll(var)
{
document.getElementById('pnlCosts').childNodes('hiddenfield').value = val.ScrollTop;
}
function scrollTo(panelName)
{
document.getElementById(panelName).scrollTop = document.getElementById('pnlCosts').childNodes('hiddenfield').value;
}
I am refreshing using: Response.AddHeader("Refresh", strPageRefresh);
Can anyone help?
|
|
|
|
|
If you refresh a page it doesn't post back. It just reloads the page. If you want any form fields sent back you need to cause a postback not a refresh.
|
|
|
|
|
First, please format any code you post using the pre tags.
Are you updating the value in your hidden field during the postback, i.e. using viewstate or other techniques? If not then of course the value will be reset to the default state after each postback I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi
I was following the example given in a website, which gave no indication of having to set a ViewState or Session variable.
This is the website: http://urenjoy.blogspot.com/2009/06/maintain-scroll-position-of-aspnet.html
|
|
|
|
|
The example you indicate uses a cookie. You do not. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I had a feeling this mistske would happen. Scroll the page, and you will see the other example.
|
|
|
|
|
HI ALL,
When i am trying to browse aspx page frm a virtual directory in iis,i am getting it as page cannot be displayed .but when i try to browse html page frm same path then i can able to see
can any one tell me what might be the problem?
thanks in advance
|
|
|
|
|
Are you able to open asp/x pages from other virtual directories? It might be that IIS has not been configured properly.
|
|
|
|
|
Configure you iis properly
check the .net framwork installed or not on your machine
by using below command
aspnet_regiis -i
|
|
|
|
|
Configure and enable ASP.NET in your virtual directory.
There is no foolish question, there is no final answer...
|
|
|
|
|
Hi,
How can I restrict a particular user to access a particular WebMethod, but shud be available to other users.
Rahul
|
|
|
|
|
|
Hi,
If I create a private WebMethod, will it expose to the application ? If not, then what is the use of that ?
Rahul
|
|
|
|
|
NO it will not be available. Private methods are made for operations within that class. Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|