|
T M Gray wrote: There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection.
Here is the reason this is a very good suggestion,
few know the difference between html attributes
and html properties, so it is best to stick with
the html properties which are much more well
known.
|
|
|
|
|
Andraw111 wrote: I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border
Here you are adding the attribute bordercolor to the table element,
and assigning it a value.This does not set gridview row border only
table element bordercolor.
|
|
|
|
|
I have to delete a group from Active Directory. I have create and list users working correctly and have tried many different instances of deleting group, but none have worked. Here is my current c# code, where "path" is a string read from settings.xml successfully:
public StatusObject DeleteADGroup(string user_id, string groupName, string password, string domain){
StatusObject status = new StatusObject(ClassName);
sting domainAndUserName = domain + @"\" + user_id;
if(DoesGroupExist(groupName)){
try{
DirectoryEntry entry = new DirectoryEntry("LDAP://" + path, domainAndUserName, password);
DirectoryEntry group = entry.Children.Find("CN=" + groupName, "group");
entry.Children.Remove(group);
group.CommitChanges();
status.Successful = true;
catch(Exception ex) {
// log error handling
}
else{
status.Successful = false;
//false handling
}
return status;
}
Any suggestions or help would be greatly appreciated! I've been working on this for quite some time & cannot find the correct delete code to work. I was hoping another pair of eyes(or 20) could see what I am missing. Thank you!
Bonnie
|
|
|
|
|
Cursory read, looks like you're removing all members of the group, but not deleting the group?
|
|
|
|
|
the groupName is a child group of the main group "entry". I want to remove a "CN=" group from the "LDAP" group. That, I believe, is why I have not been successful so far. I have my add group complete & it is:
DirectoryEntry entry = new DirectoryEntry("LDAP://" + path , domainAndUserName, password);
DirectoryEntry group = entry.Children.Add("CN=" + groupName, "group");
group.Properties["sAMAccountName"].Value = groupName;
group.CommitChanges();
All variables are the same, so I can't figure out why it isn't working. Thank you for looking!
Bonnie
|
|
|
|
|
Hi all,
In Visual Studio 2008, every time I use the dropdowns to create a new subroutine in my codebehind, VS creates it as private. Which, of course, the page can't read. I've looked for how to change this to a default of protected, but just can find how to do it. Could someone clue me in as to where to make this setting change so that protected is the default?
Thanks!
Denise "Hypermommy" Duggan
|
|
|
|
|
Need to validate some textboxes on the web form after tab out of each textbox. can that be done with AJAX? how?
|
|
|
|
|
Have you read anything about AJAX yet? How about this[^]?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
No you have to use Javascript for that...
|
|
|
|
|
Yeah, well his validation data may be on the server, in which case AJAX will definitely help him.
What did you think AJAX ran on the client? Please don't confuse the already clueless...
|
|
|
|
|
My mistake i think he want to make client side validation....
|
|
|
|
|
Michel Godfroid wrote: What did you think AJAX ran on the client?
The XmlHttpRequest object (which is often used by Ajax, but not strictly
reqired[an iframe is just as useful]) runs on the client and the server
doesn't require any special coding nesccessarily. It is entirely
possible to make an "ajax" request to www.msn.com and recieve a
response.
Michel Godfroid wrote: Please don't confuse the already clueless...
Sorry to hear about your confusion.
Hoping you get a clue soon ...
|
|
|
|
|
Civic06 wrote: Need to validate some textboxes on the web form after tab out of each textbox.
Use the onblur of the textbox to initiate ajax request.
|
|
|
|
|
Civic06 wrote: Need to validate some textboxes on the web form after tab out of each textbox
Dont understood why you need ajax? Can you explain your requirement a bit.
Better if you use ASP.NET validators that will validate at client side and server side as well
|
|
|
|
|
Brij wrote: Dont understood why you need ajax?
It is a requirement imposed by the title of this thread
|
|
|
|
|
Yes I read But I dont think that its a good idea to have ajax call on server. There must be some other ways also
|
|
|
|
|
Yes of course just as you have said ...
Brij wrote:Better if you use ASP.NET validators that will validate at client side and server side as well
Yes validate before posting on client then
validate on server it must be this way.
|
|
|
|
|
Brij wrote: Dont understood why you need ajax?
It may be because he wants to validate something from server side data. As For Example : When he put User name in textbox and move focus out from the text box, he want to check that, the User name is already exist on DB or Not. This is very common scenarios for any registration form.
Cheers !
Abhijit Jana | MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
|
hi, iam using asp.net with c#
iam having images in page .when i mouseover on any of the image, the image size should be zoom and display in the center of the asp.net page in the same window
can you give example which helps me
|
|
|
|
|
Hi,
Do u prefer doing it using javascript?
Tej Aj,
http://opexsolution.com/forum/
|
|
|
|
|
yes i want to use javascript with asp.net with c#
|
|
|
|
|
Why the same Qs gain and again. It wont help at all.
Have a look
|
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><script type="text/javascript">
dg=document.getElementById;
</script type="text/javascript">
</head><body>
<a href="http://www.codeproject.com">
<img src="http://www.codeproject.com/favicon.ico" alt="img goes here" width="50px" height="50px"
onmouseover="dg('displayImg').src=this.src;dg('displayCenter').style.visibility='visible'"
onmouseout="dg('displayCenter').style.visibility='hidden'">
</a>
<a href="http://www.yahoo.com">
<img src="http://www.yahoo.com/favicon.ico" alt="img goes here" width="50px" height="50px"
onmouseover="dg('displayImg').src=this.src;dg('displayCenter').style.visibility='visible'"
onmouseout="dg('displayCenter').style.visibility='hidden'">
</a>
<div id='displayCenter' style="position:absolute;top:200px;left:200px;visibility:hidden;"><img src=""
id='displayImg' width='300px' height='300px'></div>
</body></html>
modified on Monday, April 26, 2010 1:30 PM
|
|
|
|
|
Thanks for Code Project Team ........
This Logic Helps A Lot
|
|
|
|