Well that sure answers it. I'll have a look at the document mentioned there. Thanks mate! -Larantz
for those about to code, we salute you
Please refer to the Forum Guidelines for appropriate posting.
Well that sure answers it. I'll have a look at the document mentioned there. Thanks mate! -Larantz
for those about to code, we salute you
Please refer to the Forum Guidelines for appropriate posting.
It seems that the section handler did load so the TypeLoadException is gone. But instead of actually returning a NameValueCollection - it still just returns a System.Configuration.DefaultSection which is useless. I just can't get my head around why this is occurring. It's the same for custom section handlers. -Larantz
for those about to code, we salute you
Please refer to the Forum Guidelines for appropriate posting.
I'll try that. Thanks for the tip. :) -Larantz
for those about to code, we salute you
Please refer to the Forum Guidelines for appropriate posting.
Hi guys. We're trying to implement a centralized configuration for all .net applications and by so we have created a master configuration at a specific location. We're then creating a custom configuration manager that uses both the local app.config and the centralized master configuration. The master configuration is read using System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(string path, UserLevel level). The appSettings section and all other custom sections are read and available but our problem occurs when we try to read the sections from the master configuration using ConfigurationManager.GetSection(string sectionName). We get a TypeLoadException no matter what type of section handlers we use - .NET handlers or custom handlers, and the method returns a System.Configuration.DefaultSection object instead of the intended type. Could not load type 'System.Configuration.NameValueSectionHandler' from assembly 'System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Reading the same sections from the app.config of the exectuable produces no errors. Anybody with some ideas as to what causes the problem? -Larantz
for those about to code, we salute you
Please refer to the Forum Guidelines for appropriate posting.
Hi. I couldn't find a forum for Ajax so I guess it falls under asp.net. :) I'm working on a timesheet control that consists of a gridview with a column for each day. The column consists of a textbox for working hour input and an imagebutton for entering a comment for the given day. I've been trying to add a ModalPopupExtender to the item template and to set the imagebutton ClientID to the extenders TargetControlID property. This is for displaying the input controls for the comment. Setting the imagebutton id to the TargetControlID property in the markup doesn't work as the imagebuttons id is dynamically created for each row when the gridview performs the databinding. I've been experimenting with the gridviews OnPreRender method where I iterate over the rows, locate the imagebutton and extender for the given row, and set the TargetControlID. I get a asp.net error stating: The TargetControlID of 'commentModalPopupExtender' is not valid. A control with ID 'ctl00_Main_timesheetControl_gvTimeSheet_ctl02_imBtnMondayComment' could not be found. As far as I know, that id looks exactly right according to what I've seen when I look at the source of the page. Anyone who've encountered (and solved) this problem? Best regards! Larantz
for those about to code, we salute youhttp://www.itverket.noPlease refer to the Forum Guidelines for appropriate posting.
Hi everyone. I'm making a custom tool for registering working hours for my employer against a Visual FoxPro database. I've created a procedure for executing sql queries against the database, but my insert statments aren't commited. The return value (affected rows) says that the query was successfull. I'm using a normal _"insert into (col1, col2, col(n)) VALUES(val1, val2, val(n))" statement - so nothing fancy. I've tried using transactions and myTransaction.Commit();
without success. I've also tried using keywords like "GO" or "COMMIT" in the query - but the FoxPro ODBC driver isn't too keen on those keywords. :) Am I missing something here? I thought ODBCCommand.ExecuteNonQuery() used the auto-commit property. Is there and specific properties that must be set, or keywords I must include to make it commit? Sidenote: If I copy/paste the query into an ODBC tool (freeware tool I just downloaded for testing purpouses) and execute the query, the row is added successfully. I'd really appreciate any feedback you've got. -Larantz- -- modified at 5:18 Monday 22nd October, 2007 I copied the database into a cvs folderstructure the other day. Forgot to update the configuration file with the connectionstring the very next day... *humble Larantz signing out* -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
_
Hi everyone. I've been handed a Web application that dynamically loads custom UserControls. Upon a useraction, clicking a link to a given "page" (UserControl), I instanciate the control using the Page.LoadControl method, store it to Session["Control"], and add it to PlaceHolder.Controls. This seemed to work out perfectly as the control was maintained on the postback and the state was also maintained. But after I started implementing a button eventhandler I noticed that the event is never caught when the button is clicked and the control refreshes. I'm not that familiar with Asp.Net as I usually work with windows applications and services. Could anyone please point me in the right direction of how to avoid loosing the event in the postback? Best regards! -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
How about letting the types within the assemblies inherit a given interface? Then cast the instances to the interface on creation and the methods will be the same, but the implementation in the various types will differ. -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
There should be a performance gain in using List<string> as supposed to ArrayList where the strings will be boxed. Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
I'd go with what Matthew said. But why are you multiplying the pages by 100? Using pseudo-code, you've written: TimeSpent / NrOfPages * 100
Best regards! -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
Subversion is great. Haven't tried the Visual SVN though. But it supports checking in/out, reverting, branching, revision history etc etc. But I never felt like I needed it integrated in VS .NET anyhow. -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
First of all you should decide whether you want the TechnicalSkillsID as a column in the employees table - as you have now. If you keep it that way, and you want one empolyee to be able to own several TechnicalSkills, you'll have to store several ID's with a separating value. A better approach, if you ask me, would be to remove the TechnicalSkillsID column from the employee table entirely, and rather create a TechnicalSkills table which uses the employeeID as a keyvalue. Then add one boolean column per technical skill that you want available. You could then use the column name as a the name of the CheckedListBoxItem and set the Checked property according to the value from the database. I'll write an example of the latter one: Create a query for retrieving the row from the TechnicalSkill table with a employeeID equal to the employee you want to configure skills for. Code for propagating and setting the value for CheckedListBoxItems:
... generate and execute the query for returning the techskills for the given employee
DataTable techSkillsTable = myDataSet.Tables\[0\];
//Query should return only one row, but we'll go with a foreach
foreach(DataRow row in techSkillsTable.Rows)
{
foreach (DataColumn column in techSkillsTable.Columns)
{
string techSkillName = column.ColumnName;
bool userHasSkill = false;
try
{
userHasSkill = Convert.ToBoolean(row\[column\]);
}
catch
{
//Do nothing here as userHasSkill is initialized to false.
}
techSkillsListBox.Items.Add(techSkillName, userHasSkill);
}
}
Hope it can be of some help. Best regards! -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
I belive you can do something according to:
List<int> selectedRowIndexes = new List<int>();
foreach(DataGridViewRow row in dataGrid.SelectedRows)
{
selectedRowIndexes.Add(row.Index);
}
//To save bandwith and cputime you should make one query for deleting all the rows
//instead of deleting one at a time.
... code for deleting the indexes ...
Happy coding! -Larantz- -- modified at 18:00 Friday 7th September, 2007 Fixed missing <> for the generic list.
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
What's a syncfusion menubar? 3d party control? If so - does it come with documentation? -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
I see your point - as he doesn't know where it's happening and it might be a large application. Though he could show us exitpoint of application, cleanups, anything related to starting/stopping threads perhaps. :) -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
I'm not sure. But I don't see the point of having a xls schema to help you form your xml correctly, if you don't follow the schema. :) Then you might aswell remove it. -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
DaveyM69 wrote:
and do your DB inserts instead of Console.WriteLine
:-D -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
According to the errormessages, I'd say that your xml file violates the rules dictated by your xls schema. If you don't want to edit the xml file, you'll most likely have to take a look at the xls schema. -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
You could for instance set the various columns, except your checkbox column, to readonly. Then when you click your editbutton, extract ticked DataRow and edit the data in a custom control. Or set all DataRows.ReadOnly property to 'true' except the ticked one. You could do this in the DataGridView.CellValueChanged event handler. -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.
Could you please provide us with the error message you're getting? -Larantz-
for those about to code, we salute you
http://www.itverket.no
Please refer to the Forum Guidelines for appropriate posting.