15,994,963 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by tmbgfan (Top 7 by date)
tmbgfan
1-Feb-12 16:44pm
View
Deleted
Your code is so contrived that it seems pointless.
Using your example, you can achieve the same result by adding `<asp:AsyncPostBackTrigger ControlID="cmdBind" EventName="Click" />` to the `OtherDataPanel` and then updating the server-side `cmdBind_Click` code to bind both repeaters.
Instead, your example is making two requests to the server instead of one to bind each Repeater separately. Why? Just so you can implement `IPostBackEventHandler` for no good reason? It makes no sense.
You talk about "less bits being transferred", but your technique still delivers the same payload to the client, but in two requests instead of one. You aren't even returning JSON to the client so I am not certain of what these "less bits" are.
Then to top it off you throw insults at someone? Really? Yikes.
tmbgfan
17-Jan-12 16:24pm
View
Deleted
@Greg - "learn LINQ [...] the correct way". Okay. I guess we should ignore experts like Scott Guthrie [http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx] when they demonstrate the same technique as the OP did because you say it is not the "correct" way.
tmbgfan
17-Jan-12 15:57pm
View
Deleted
@Greg - To be brutally honest, I probably would not have started this discussion with you except for your vote of 1. Too many times on Code Project I see people voting 1 because "that's not how I do it". Okay, that's great. You do things differently. That doesn't mean that Herin's tip is not viable. His title states it all: "LINQ-to-SQL Mapping Stored Procedure with Multiple Results". Does his tip demonstrate this? Yes. Is it a tip that some might find useful? Yes. Are there other ways to do SIMILAR (not necessarily the same) things? Yes, but that shouldn't garner a vote of 1 as far as I can tell.
tmbgfan
17-Jan-12 15:38pm
View
Deleted
@Greg - Using your alternative example, yes one can drill down through entity associations using LINQ to get at properties of associated types; I am not arguing that point. However, Herin's example would also apply to calls to stored procedures that return multiple result sets where there is no association between the result sets. It just so happens that in his example data there is an association. So lets just say that your alternative is a viable one when: (1) you are allowed to query the db without using a stored procedure (in some shops this is not an option) and (2) there is an association between the different result sets.
tmbgfan
17-Jan-12 13:56pm
View
Deleted
@Greg - "this is the correct way to do this".. sure, if the question is "How do you select an aggregate anonymous type using LINQ?". The OP's tip is a perfectly legitimate example of how to split multiple result sets from a stored procedure using LINQ-to-SQL into explicitly defined entity types (not anonymous aggregates).
tmbgfan
17-Jan-12 12:05pm
View
Deleted
@Jon - Your code is for counting lines in a FILE. This article is about counting lines in a STRING.
tmbgfan
17-Jan-12 12:00pm
View
Deleted
@Greg - The link you posted is for Entity Framework whereas Hiren's article is about LINQ-to-SQL.
Show More