Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

Larantz

@Larantz
About
Posts
126
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Loading app.config from a remote location fails to load section handler.
    L Larantz

    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.

    C# csharp com help question announcement

  • Loading app.config from a remote location fails to load section handler.
    L Larantz

    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.

    C# csharp com help question announcement

  • Loading app.config from a remote location fails to load section handler.
    L Larantz

    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.

    C# csharp com help question announcement

  • Loading app.config from a remote location fails to load section handler.
    L Larantz

    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.

    C# csharp com help question announcement

  • Asp.Net Ajax - Problem referencing object to a ModalPopupExtender within a gridview row.
    L Larantz

    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.

    ASP.NET help csharp html asp-net com

  • [Solved]Insert statement against a FoxPro database isn't commited using ODBCConnection in C#
    L Larantz

    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.

    _

    Database database beta-testing csharp com testing

  • ButtonClick eventhandler for dynamically loaded UserControl fails to catch event.
    L Larantz

    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.

    ASP.NET csharp asp-net com tutorial question

  • dll library loading
    L Larantz

    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.

    C# csharp visual-studio question

  • Splitting strings while taking escaped characters into account
    L Larantz

    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.

    C# question

  • Calculate time with int
    L Larantz

    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.

    C# tutorial question

  • CVS`
    L Larantz

    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.

    C# csharp visual-studio

  • Setting checkedlist box from sql querie
    L Larantz

    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.

    C# csharp database question

  • datagrid selected rows loop
    L Larantz

    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.

    C# database tutorial

  • Syncfusion menubar and logo
    L Larantz

    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.

    C# question

  • Debug error !!!
    L Larantz

    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.

    C# help debugging

  • xml validation in C# giving errors during the process?
    L Larantz

    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.

    C# xml csharp database help question

  • to read from a notepad file line by line and insert each line into one table
    L Larantz

    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.

    C# csharp question

  • xml validation in C# giving errors during the process?
    L Larantz

    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.

    C# xml csharp database help question

  • Gridview aditing
    L Larantz

    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.

    C# help

  • xml validation in C# giving errors during the process?
    L Larantz

    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.

    C# xml csharp database help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups