Search

You searched for the word(s): userid:830774

Matching Posts

  • datareader is null when db connection is closed.

    I have the code below where it doesn't return data whenever I close the database connection. But if I remove the this.conn.Close() command, datareader has the value. What am I doing wrong here? Thanks. MySqlDataReader dr = null; MysqlConnection conn = new MysqlConnection(); private MySqlDataReader getMyFTPSites( { try { string connect_string = "string_here"; string query = "Select...."; this.conn = new MySqlConnection(connect_string); this.conn.Open(); MySqlCommand command
    Posted to Getting Started (Forum) by cykill on 9/17/2009
  • Delete a folder from ftp?

    Anyone know a way to delete a folder and all its contents on an ftp server? I am able to create folders using the ftpwebrequest object but I don't see a delete function to it. I'm trying not to run console commands from c#.net. Thank you. Cykill,
    Posted to Free For All (Forum) by cykill on 7/3/2009
  • Re: how to rewire an event handler after postback.

    I think I figured out the every other postback wiring issue. I removed a function call after the form submit and now its wiring up on every postback.
    Posted to Web Forms (Forum) by cykill on 4/28/2009
  • Re: how to rewire an event handler after postback.

    I'm sorry, are you saying I should move the wireup from OnInit to Page_Init?
    Posted to Web Forms (Forum) by cykill on 4/28/2009
  • Re: how to rewire an event handler after postback.

    Ok. I've moved the sql stuff to oninit. We're close. Now, the event handler is rewiring on every other postback. What could be causing it?
    Posted to Web Forms (Forum) by cykill on 4/28/2009
  • Re: how to rewire an event handler after postback.

    ok. Here's more code snippets. This form is inside a webpart. Everytime the webpart loads, it loads the form. What I want is when someone submits the form, it updates the db, then the form reloads and the event handler for the button to be connected so the user can submit the form a second time. public class myform : WebPart { protected Button button; protected void OnInit(){ button = new Button(); button.Click += EventHandler(addComments); } protected override void CreateChildControls(){ //Controls
    Posted to Web Forms (Forum) by cykill on 4/26/2009
  • Re: how to rewire an event handler after postback.

    Thanks. I understand that logic however, the showForm method gets called from another method which creates dynamic table controls to place the form in the proper location on the page. Is there another way to submit a form without event handlers? This is all inside a webpart so there is no aspx page. It's all in a dll.
    Posted to Web Forms (Forum) by cykill on 4/24/2009
  • Re: how to rewire an event handler after postback.

    If I put it in Page_Init, won't that get called twice and get two of the same controls? Once on page_init and once when the controls gets created when it hits showForm(id)? showForm actually gets called everytime the page gets loaded.
    Posted to Web Forms (Forum) by cykill on 4/23/2009
  • Re: how to rewire an event handler after postback.

    Where do I get the value for "id" from Page_Init?
    Posted to Web Forms (Forum) by cykill on 4/23/2009
  • how to rewire an event handler after postback.

    ok, I have a dynamically created web form control. How can I rewire this so that it doesn't lose the event handler after a postback. Below is a snippet of my code. The problem I have is that the form uses dynamically generated values that's needed for the form to update the correct sql record. So I can't wire the event handler too early in the life cycle. Each time the button is clicked, it would update sql and do a postback which will recreate the form. Any ideas? protected Panel showForm
    Posted to Web Forms (Forum) by cykill on 4/23/2009
Page 1 of 3 (30 items) 1 2 3 Next >