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:774692
More Search Options
RSS Available
Matching Posts
Re: Apply CSS to ASP.NET C# Code
have you tried TestGridView.CssClass = "groupbox"?
Posted to
Data Presentation Controls
(Forum)
by
Schmakt
on 11/25/2009
Re: GridView sorting is not working when paging
I assume that the Search() function is creating the DataTable to populate the GridView? Within the context of the Search() function are you also resetting the SortDirection and SortExpression values? in the gvResults_Sorting() method, you are sorting the underlying datatable, not the gridview itself... if you are recreating the datatable in the PageIndexChanging method, you will lose the sort values. I would try removing the sorting logic from the Sorting() method and give it its own function...
Posted to
Data Presentation Controls
(Forum)
by
Schmakt
on 11/25/2009
Re: Setting the Datasource for a dropdownlist
yah, ouch... that's hella hard to read... you could also set that in code-behind... ddlSuggestBoxDiensten.DataSource = Digipolis.Bestelaanvraag.DataAccess.MedewerkerDB.GetajaxListdienst; ddlSuggestBoxDiensten.DataBind();
Posted to
Data Presentation Controls
(Forum)
by
Schmakt
on 11/23/2009
Best Practice for Opening / Closing SqlConnections
I've been doing this forever, but it just occurred to me to maybe ask and see if this is really best... Is there a more streamlined way I should be handling my sql connections in the code-behind? SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ToString()); try { conn.Open(); *Do Stuff* } catch (Exception ex) { lblMessage.Text = "Error in this Function:<br />" + ex.Message.ToString(); } finally { if (conn.State == ConnectionState
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Schmakt
on 11/23/2009
Re: Best Practice for Opening / Closing SqlConnections
[quote user="Naom"] Hi Matt, I was thinking about it just recently. Do you know how can we incorporate error handling inside the using block? [/quote] cool, thanks! I obviously didn't even know that .Dispose() would take care of the .Close() for me, so at least I can lose that... but my next question was going to be the same as Naom's... when I write my own try...catch...finally, I can spit back custom error messages including my sql statement or whatever else... that didn't
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Schmakt
on 11/23/2009
Re: Best Practice for Opening / Closing SqlConnections
great information; thanks everyone... I'll try to start implementing these structures over the Thanksgiving holiday; thanks again! :)
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Schmakt
on 11/23/2009
Re: Prevent controls bound to SqlDataSource from rebining after OnCommand even of LinkButton in same UpdatePanel
Thanks Mark... I had come to the same conclusion after playing with this for a while... talk about inelegant! I've been playing with a couple of solutions (I'm dealing with about a dozen non-linearly linked DropDownBoxes), and I think that I'm going in favor of removing the DataSources and creating my needed data in the code behind as opposed to trying to change the SelectCommand/Set the DataSourceID/Set the FilterExpression on all these boxes. Thanks again! -jim
Posted to
Data Presentation Controls
(Forum)
by
Schmakt
on 11/19/2009
Prevent controls bound to SqlDataSource from rebining after OnCommand even of LinkButton in same UpdatePanel
I have a GridView control inside of an update panel with some filtering options above it (DropDownLists with OnSelectedIndexChanged events): <asp:GridView ID="GridView1" AllowSorting="true" AllowPaging="false" runat="server" DataSourceID="sdsFullTitleList" DataKeyNames="TitleID" AutoGenerateEditButton="true" AutoGenerateColumns="False" BorderColor="White" BorderStyle="Outset" BorderWidth="2px"
Posted to
Data Presentation Controls
(Forum)
by
Schmakt
on 11/18/2009
ignore articles in SQL ORDER BY
not having much luck with google on this, cuz all my keywords seem to mean other things... I have a datasource already populated (and cannot add another column for "article" or "sortname" or anything due to the number of UI's that feed to the db... I'd like to sort results in a query by leaving out articles at the beginning... I've done this simply using a REPLACE function: ORDER BY REPLACE (REPLACE([FieldName],"The ",""),"A ",""
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Schmakt
on 11/18/2009
Re: ignore articles in SQL ORDER BY
Sorry, the data is just the titles of a bunch of a bunch of things... eg: A Walk on the Wild Side American Gods Breakfast of Champions The Brothers Karamazov The Knight in History The sort above is the default way the values are sorted if I simply say "ORDER BY [FieldName]" What I'd prefer is the proper alphabetical sorting which ignores articles... so the list above should be: American Gods Breakfast of Champions The Brothers Karamazov The Knight in History A Walk on the Wild Side
Posted to
SQL Server, SQL Server Express, and SqlDataSource Control
(Forum)
by
Schmakt
on 11/18/2009
Page 1 of 14 (135 items) 1
2
3
4
5
Next >
...
Last »
ASP.NET:
Merry Christmas
TechNet Edge:
FPE Customer Story
Silverlight:
Being a writer, and having an editor. A Short Rant.
Channel 9:
Channel 9 Live at PDC09: Dr Brian Brooks (3M)
Channel 9:
C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 13 of 13
Silverlight:
Information for Silverlight HVP Developers…
WindowsClient:
Custom Content Loaders in Silverlight 4.0
WindowsClient:
MVVM Links\Info
TechNet Edge:
Check out how Dolly Parton uses IE8 and Web slices!!!
Silverlight:
A Silverlight HVP Update
Channel 9:
Channel 9 Live at PDC09: This Week on Channel 9 - PDC09 Daily Show Edition Day 1
Channel 9:
Maria Klawe: Scholar, Scientist and Microsoft Board Member
Channel 10:
Play the Bing Sherlock Holmes Game
Channel 9:
Channel 9 Live at PDC09: Loic Le Meur
Channel 10:
How to Delete Jump List Items
Channel 10:
Roll Back to Classic Network Indicator in Win7
Channel 9:
Jafar Husain: Silverlight Toolkit and Rx, Part 2
Channel 9:
Ping 42: Is Microsoft cool? Photo DNA, Win7 tool, 10k MIX contest
Channel 9:
Jafar Husain: Silverlight Toolkit and Rx, Part 1
Channel 9:
Francesco Logozzo - Static Checking with Code Contracts for .NET
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online