|
Hi Team,
Anyone knows, how to edit Domain Default Policy using C# or power-shell?
I am looking for "Automatic Certificate Request" setting update.
-- Vikram
|
|
|
|
|
|
Hi
I have 3 labels in my aspx page named lbl1, lbl2, lbl3.
I want to loop them in my cs file like this:
for (int i = 1; i<3; i++)
{
lbl(i).Text = someFunction(i);
}
How can i do that?
|
|
|
|
|
I assume that you can do the same as you would in a Windows Form, and use foreach to loop through a set of control objects.
|
|
|
|
|
Label[] labels = form1.Controls.OfType<Label>().ToArray();
for(int i = 0; i < labels.Length; i++)
{
labels[i].Text = someFunction(i);
}
|
|
|
|
|
Thanks but now i get another error:
Error 25 'System.Web.UI.ControlCollection' does not contain a definition for 'o' and no extension method 'o' accepting a first argument of type 'System.Web.UI.ControlCollection' could be found (are you missing a using directive or an assembly reference?)
When I try do add a using it cannot be found...
(I am working on a web.net project not a console one)
What am I missing??
|
|
|
|
|
Thanks but now I get this error
Error 25 'System.Web.UI.ControlCollection' does not contain a definition for 'o' and no extension method 'o' accepting a first argument of type 'System.Web.UI.ControlCollection' could be found (are you missing a using directive or an assembly reference?)
When I tried to add the using it cannot be found
What am I missing here?
Thanks!
|
|
|
|
|
See attached image file: [IMG]http://imagizer.imageshack.com/img908/3636/urFBbz.jpg[/IMG]
assuming the data is loaded from SQL Server GridView includes 5 columns as shown above, cells Search of textbox where you find out quickly (due to its use on the image for illustration), in his cell this search textbox enter any value in the column that has (according to this column 5), the GridView grid lines present value of the lookup value, usually looking to have a value equal to 1 column with which to look, if you use fast search method does not need to specify one column before it, how to write this quickly find how to load into the GridView ?
|
|
|
|
|
1) No, I'm not going to random sites to look ate random images.
2) None of that makes any sense. It's probably a translation problem, but in English I can;t work out what you are trying to do, much less what help you need.
Remember that we can't see your screen, access your HDD, or read your mind. So try to give us information - perhaps an example - which means we can work out what the problem is.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
This is not really a C# issue.
It could be Windows Forms, Silverlight/WPF, or ASP.
Please use the correct forum.
A positive attitude may not solve every problem, but it will annoy enough people to be worth the effort.
|
|
|
|
|
Hi Guys,
I'm running Visual Studio 2008. I have a simple project that displays data in a DataGridView that is linked to Dataset, BindingSource and TableAdapter.
My data is in SQL Server and in a single table.
My program so far reads the data in no problem but I'm stuck saving my changes back to the database.
I can see I need to create an update query. I found the properties of the TableAdapter named "UpdateCommand" When I run Query Builder it creates a query like this.
UPDATE ExecuteItem
SET iOrderBy =, sDescription =, bContinueOnFailure =, dLastRunTime =, bLastRunStatus =, sSQLCode =, bActive =
Obviously it is missing a name between the equals and the comma.
What is the syntax for specifying the names of my fields in the dataset?
Can someone point me to an example of how this query should look for a simple single table update?
Thanks
David
|
|
|
|
|
This is not really a C# issue.
Please use the Database forum.
A positive attitude may not solve every problem, but it will annoy enough people to be worth the effort.
|
|
|
|
|
Hello Again,
After a good nights sleep the answer to my initial problem was obvious.
As it is SQL the only answer can be parameters.
So within the Query Builder I inserted Paramaters in the format of @FieldName in the "New Value" column.
Now my SQL code looks like this.
UPDATE ExecuteItem
SET iOrderBy = @iOrderBy, sDescription = @sDescription, bContinueOnFailure = @bContinueOnFailure, dLastRunTime = @dLastRunTime,
bLastRunStatus = @bLastRunStatus, sSQLCode = @sSQLCode, bActive = @bActive
Now when I execute my program and change one row in the Datagridview it updates every row in the database with the same value.
This now seems like a question about Visual Studio more than anything else. I'll take my question else where if you still think it isn't appropriate here.
Thanks
David.
|
|
|
|
|
Again Obvious when I think more about it.
I needed to put a WHERE clause in my SQL.
UPDATE ExecuteItem
SET iOrderBy = @iOrderBy, sDescription = @sDescription, bContinueOnFailure = @bContinueOnFailure, dLastRunTime = @dLastRunTime,
bLastRunStatus = @bLastRunStatus, sSQLCode = @sSQLCode, bActive = @bActive
WHERE (lExecuteItemID = @lExecuteItemID)
So you are right not a C# problem at all
I don't know why I couldn't get the auto generate feature of Visual Studio to create this SQL. It reports success but does not create anything. (Insert and Select are created OK)
I also don't know how Visual Studio magically assigns the correct values to my parameters. I use the same field names just stuck an @ sign in front of them. I also kept them in the same order but this seems to rely heavily on luck. They must be assigned somewhere.
Anyway sorry to bother you guys with this.
Thanks
David
|
|
|
|
|
David_Pollard wrote: I'll take my question else where if you still think it isn't appropriate here Don't worry about it, but in the future, choosing the correct forum means the people who see your question are the ones who are most likely to be able to help!
A positive attitude may not solve every problem, but it will annoy enough people to be worth the effort.
|
|
|
|
|
I am developing an activex control for use with ie. The javascript code responds to dragdrop event and calls activex control's c# function. At this point I need to gain access to clipboard and retrieve custom data based on format code. There is an interface IDataObject which could be used for that. But I need to gain access to parent form. Is there a way to access browser form from activex control? If you know of a better way to get to the same clipboard data, please, let me know.
Any help is appreciated.
Thanks in advance
|
|
|
|
|
|
Where's the definition for .subFolderField?
The getter and setter don't make sense.
A collection that triggers OnPropertyChanged events is generally defined somewhere as an ObservableCollection.
|
|
|
|
|
|
|
|
You didn't read the whole thing ... I would consider the last entry on that page ... using your array and a partial class, if need be.
|
|
|
|
|
|
I was suggesting it as a "pattern".
If you can't apply it to your situation, then I don't know what will.
|
|
|
|
|
Hi
We have a standard application that uses AD sso, using forms authentification.
Before last upgrade of this system I wrote a small c# code that opend a browser with a different account than computer user account.
Witch worked fine becuse windows auth. where used then. So user become that new user instead of computer user.
But when they switched to forms auth. in IIS this no longer works. I have no clue how to trick authentification mechanism in this case. Any who hade done this?
Described in Another way;
User (AD-user), let say ABC is logged in to computer. But whants to start application (webpage, IE) as user BBB.
And no, I cant get any Changes in application itself.
\Jonas
|
|
|
|