|
hi, i have problem when i made application to change active directory user password using asp.net.
The application has been tested under C# console app..and it works,
but it gives access denied when i use asp.net
i have set some web config, it works only when i search the directory. but when i try to invoke IADsUser.SetPassword..again..access denied.
Anybody can help?
Thanks a lot
|
|
|
|
|
You have to give the proper permission to asp.net user , although its not safe. You can impersonate to another user which have sufficient permission for that purpose.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
How can I make my ListBox select whatever item my mouse is on when I RIGHT CLICK?
/\ |_ E X E GG
|
|
|
|
|
I never had any problems creating and finding event handlers using the C++ V6.0 ClassWizard but I don't find C# so easy to use in this respect. I have resorted to editing the code without the aid of a wizard on many occasions but I'm sure this can't be the best way - I imagine I'm missing something obvious . I have two specific questions:
How do you add an event handler to a Toolbar button? Double clicking doesn't do anything, if you right click there is no "add event handler" option, and the Control Events button does not appear on the Properties view. All these things work with Dialog buttons, why not with Toolbar buttons?
How do you create and locate handlers for UPDATE COMMAND UI messages? The V6.0 ClassWizard used to show these clearly but I can't find any reference to them on the C# Event Handler Wizard or the Properties view.
Any assistance would be greatly appreciated.
Best Regards
Cliff Hatch
|
|
|
|
|
Cliff, .NET is a bit different than MFC.
By doubleclicking a control in the visual designer you'll get an event handler created for the control's default event.
If you want to add any other eventhandler visually, then you'll have to use the Control Events button to show the events a selected control supplies (and which are marked designer-visible).
Nevertheless, adding event handlers manually is just as easy.
For example, adding a click event handler to a button in VS.NET can be achieved by typing
myButton.Click += and then TAB twice.
VS.NET finishes the statement and adds a new myButton_Click() event handler with the correct signature.
If the Control Events button doesn't appear for a certain control then this control doesn't have any public visible events.
Regarding the click on a ToolButton, this event is fired by the ToolBar containing the button.
And for menus, there's the Popup event that's fired just when a menu is about to appear, so you can use this event to enable/disable your menu items.
Regards,
mav
|
|
|
|
|
mav
Thankyou for your clear reply.
I now understand why the system behaves as it does, and I will try your method of adding handlers manually.
I'm still puzzled why the designers of .NET chose this route though. I wonder if they planned to discard MFC's wizard support for the creation of ToolButton and Update handlers, or if this was an unintended side effect of design rationalisation.
Best Regards
Cliff
|
|
|
|
|
After a bit more exploration I found that I had indeed missed something:
If you right click on menu items and select the "add event handler" option, the Event Handler Wizard appears and gives you the option to create or edit COMMAND and UPDATE_COMMAND_UI messages - so that's where they're hidden!
The rule seems to be: right click on the thing you want to create a handler for and the Event Handler Wizard will provide pretty much the same functionality as MFC's ClassWizard - except that it doesn't work for toolbar buttons because you don't get an opportunity to call it up.
I suppose one way round this is always to build a menu item first, attach handlers to it, then build a toolbar button with the same ID - and it will share the same handlers. Perhaps it is good practice to replicate every toolbar function in a menu, so maybe this approach makes sense. On the other hand, I don't see why a right click on the toolbar shouldn't offer the "add event handler" option. The treatment of toolbar buttons seems inconsistent with that of menu items and dialog buttons.
Best Regards
Cliff
|
|
|
|
|
Hi,
I'm using a Datagrid control, bound to a dataview, with several threads updating the dataview by adding rows to it. The datagrid updates fine until the scroll bar appears and then i get a situation where two scrollbars appear instead of one (two vertical and two horizontal scrollbars).
The scrollbar is not a part of any panel and stands independently in the form.
I used a code template found in this site to build the data grid. Updating it is done simply by adding rows to the table of the dataview object.
Here is the code to generate the scrollbar:
System.Windows.Forms.DataGridTableStyle DGStyle =
new DataGridTableStyle():
DataGridTextBoxColumn textColumn;
foreach (DataColumn dc in eventsTable.Columns)
{
textColumn = new DataGridTextBoxColumn();
textColumn.MappingName = dc.ColumnName;
textColumn.HeaderText = dc.Caption;
textColumn.Width = 200;
textColumn.Alignment = System.Windows.Forms.HorizontalAlignment.Left ;
textColumn.ReadOnly = true;
DGStyle.GridColumnStyles.Add(textColumn);
}
DGStyle.MappingName = eventsTable.TableName;
DGStyle.AlternatingBackColor = Color.Gainsboro;
DGStyle.AllowSorting = false;
DGStyle.ReadOnly = true;
LogGrid.TableStyles.Clear();
LogGrid.TableStyles.Add(DGStyle);
eventsView = new DataView(eventsTable);
LogGrid.DataSource = eventsView;
|
|
|
|
|
Hi All.
I need to make an application in c# which could be check updates of its next versions.1.
1. Is there any good article about this?
2. can I do it from the projects under 'setup and deployment' projects in VS.NET
3. any free tool to do this...
I want simply :
-->when the programs invokes check for new updates
-->if there promtp to user do update now
-->if user will give okey update program close all the open files about application and get new version dlls, resource so on...
--> and restart the application
karanba
|
|
|
|
|
|
hi,
I have a label control and a button in my form. On button click i am changing the height of the label control.
My problem is i want to change the height of the label control from bottom but it is changing from top.
Any idea
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
|
That's not the best solution. A better way is to change the Anchor property. It selects which sides of the control are not allowed to move on a resize.
|
|
|
|
|
hi,
thnaks for both answers. But it is not serving my purpose. Anchor , location etc are i already tried and failed to achive my need.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Hi...
Codeproject has code samples for Hotmail and Gmail client api's, but none for Yahoo! Mail.... Anyone know where such code is available?
Thanks!
Amberite
|
|
|
|
|
Doesn't Yahoo just use regular POP and SMTP protocols? Certainly, I download my Yahoo mail into a regular email client.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Does it? Then what's up with the whole yPops project and several others that attempt to create a pop3 connection to Yahoo?
Amberite
|
|
|
|
|
Amberite00 wrote:
Then what's up with the whole yPops project and several others that attempt to create a pop3 connection to Yahoo?
I'm assuming they are external to Yahoo. For $19.99 per year you can get a POP connection (along with other benefits - like 2Gb mail account) - If you signed up before a certain date I think you can get a POP connection just for signing up to receive certain offers in your mail.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I have made a pop3 conenction to yahoo many times.
/\ |_ E X E GG
|
|
|
|
|
Hi,
I am writing a Web Application in c#. Can someone tell me how can I put some code to fire whenever the close (X) button of the Internet Explorer Window is hit?
Thanx
.::YF::.
|
|
|
|
|
There was a discussion about this on the ASP.NET forum a couple of months back. IIRC the conculsion was that you cannot.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Good Day everybody
Currently, i am developing a DLL (Class Library) that will be used by third party. I found that the user have difficulties to understand what is the purpose of the Functions that i write.
What i want to achieve is something like when we create an instance of string during development time, and when i select the function "GetType()", then the description "Get the System.Type of the current instance." will prompted.
Can anybody tell me how to do this?
Can i use Attributes?
Thanks
|
|
|
|
|
|
A small addition to the link Colin provided.
Give the xml documentation file the name of your class library plus the .xml extension (libraryname.xml) and distribute it with your class library.
Intellisense will use the information given by the documentation file to prompt descriptions.
www.troschuetz.de
|
|
|
|
|
Thanks you very much Colin and Stefan
I have been able to do what i want in C#.
However, i have one more question.....
Can i do it in VB.net too ??
|
|
|
|