Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:830774
More Search Options
RSS Available
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 >
Channel 10:
iBing uBing: Bing iPhone App Arrives
WindowsClient:
Migrating an Outlook Client to .NET Framework 4 in Visual Studio 2010
Channel 10:
A Look Behind Mouse 2.0
WindowsClient:
Using Speech Synthesis in .NET 4 and Windows 7
Channel 10:
Office 2010 "5 Rules" Presentation
ASP.NET:
Live Preview jQuery Plugin
WindowsClient:
Remember JScript closures capture all variables in scope
TechNet Edge:
UAG reaches RTM
Channel 9:
Who, What, When, Where, Why and How of MIX10
Channel 10:
Berlin Wall in Silverlight
TechNet Edge:
System Center Operations Manager 2007 R2 – Service Level Dashboard part 2, Installation
Silverlight:
Contributing to the SL HVP
Silverlight:
Best SF Books of All Time
Channel 9:
Reactive Extensions API in depth: Repeat
Channel 9:
Jeffrey Van Gogh: Testing Rx with Pex
Channel 9:
The Visual Studio Documentary: Dan Fernandez Full Length Interview
ASP.NET:
Search Engine Optimization (SEO) Toolkit
Channel 10:
This Is Your Data on Silverlight
ASP.NET:
How the IIS SEO Toolkit Saved My Butt
TechNet Edge:
Windows 7 XP Mode User Experience
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online