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:849817
More Search Options
RSS Available
Matching Posts
Re: Closing sqldatareader in Finally section
Please try the code below... protected void Button1_Click(object sender, EventArgs e) { using(SqlConnection conn = new SqlConnection()) { using(SqlDataReader dr = new SqlDataReader()) { try { conn.ConnectionString = ""; SqlCommand cmd = new SqlCommand("Select_SP", conn); cmd.CommandType = CommandType.StoredProcedure; conn.Open(); dr = cmd.ExecuteReader(); dr.Read(); } catch (Exception ex) { RaiseError(ex.Message); } } } }
Posted to
Getting Started
(Forum)
by
RemithR
on 12/2/2009
Re: Closing sqldatareader in Finally section
The below code will fix your error protected void Button1_Click(object sender, EventArgs e) { using (SqlConnection conn = new SqlConnection()) { try { conn.ConnectionString = ""; SqlCommand cmd = new SqlCommand("Select_SP", conn); cmd.CommandType = CommandType.StoredProcedure; conn.Open(); using (SqlDataReader dr = cmd.ExecuteReader()) { dr.Read(); } } catch (Exception ex) { RaiseError(ex.Message); } } }
Posted to
Getting Started
(Forum)
by
RemithR
on 12/2/2009
Re: Closing sqldatareader in Finally section
You don't need a close in the Finally section because of using statement. If exception happend in the middle of using part, it will becaught by the catch{} and reader will be closed because of using statement. Please read the following articles to know more about using statement. http://www.codeproject.com/KB/cs/tinguusingstatement.aspx http://davidhayden.com/blog/dave/archive/2005/01/13/773.aspx
Posted to
Getting Started
(Forum)
by
RemithR
on 12/2/2009
Re: get the reference on actual site working on
you could access the controls in the page(default.aspx) with this eg: if txtBoxFirstName is a text box in default.aspx then you could access the text input by this.txtBoxFirstName.Text from default.aspx.cs
Posted to
Getting Started
(Forum)
by
RemithR
on 12/1/2009
Re: Finding the exception‘s cause
Please follow the stack trace of the exception or the inner exception if any.
Posted to
Getting Started
(Forum)
by
RemithR
on 12/1/2009
Re: Local website: use directory other than INETPUB
When you create the Web project with Visual studio .... In the New Web Site window select the Location: as File System
Posted to
Visual Studio 2008
(Forum)
by
RemithR
on 11/20/2009
Re: Cleaning a solution question.
Please follow the detailed explanation in the link.... http://forums.asp.net/t/1064959.aspx
Posted to
Visual Studio 2008
(Forum)
by
RemithR
on 11/20/2009
Re: Unexpected end of file looking for </div> tag
Please check this article.... http://support.microsoft.com/kb/316946
Posted to
Getting Started
(Forum)
by
RemithR
on 11/20/2009
Re: ModalPopupExtender Align problem
if you want to position the modalpopup use the X and Y propertes of the ajaxToolkit:ModalPopupExtender.... <ajaxToolkit:ModalPopupExtender ID="mpe" runat="server" TargetControlID="btn1" PopupControlID="ModalPanel" X="" Y=""/ > or If you you want to position the Table inside the modalpopup, use a Panel with suitable width and height and position the table accordingly inside the panel. Remember to update the PopupControlID with the Panel
Posted to
ASP.NET AJAX Control Toolkit
(Forum)
by
RemithR
on 11/20/2009
Re: How to set button text vertical aligment
Did you notice this... width:34px; height:154px; I believe you treid the reverse...
Posted to
Client Side Web Development
(Forum)
by
RemithR
on 11/19/2009
Page 1 of 27 (263 items) 1
2
3
4
5
Next >
...
Last »
Channel 9:
Channel 9 Live at PDC09: Dr Jeff Norris, NASA
Channel 10:
Flickr Drive Integrates Flickr into Windows Explorer
Channel 10:
Playfire: A Growing Network for Gamers
Channel 10:
Find the Top iPhone Apps with Bing (Yes, Really!)
Channel 10:
Xbox to Become Emergency Alert System
Channel 10:
Progression of the Iconic Background
WindowsClient:
ASP.NET AJAX 4.0 Data Binding on MSDN Magazine
WindowsClient:
Don’t miss out..
TechNet Edge:
Improving Collaboration with SharePoint - Tech Focus December 2009 Part 1
Channel 9:
Channel 9 Live at PDC09: Scott Guthrie
Channel 10:
Get Discounted Concert Tickets at the New Windows Section 7
Channel 10:
Get Bing Wallpapers on the iPhone
Channel 10:
Bing Gets a New Toolbar
ASP.NET:
More on medium trust: what permission are you missing?
Channel 9:
Channel 9 Live at PDC09: Bob Muglia
WindowsClient:
Adventures With Windows Azure Diagnostics
Mix Online:
Adventures With Windows Azure Diagnostics
Channel 9:
Channel 9 Live at PDC09: Ray Ozzie
Channel 9:
Coding4Fun: DrinkTendr
Channel 9:
TWC9: Scott Hanselman, John Galloway, Bing, parallel unit tests, more
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online