Click here to Skip to main content
15,791,740 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionVS2017 Code behind function to disable check Box on Combo Box Text Value Pin
Jason Parker 3335-Jul-22 23:57
Jason Parker 3335-Jul-22 23:57 
AnswerRe: VS2017 Code behind function to disable check Box on Combo Box Text Value Pin
Richard Deeming7-Jul-22 3:14
mveRichard Deeming7-Jul-22 3:14 
Questionis there any code for capture screenshot and retrive system information in .net mvc core? Pin
Member 1568985228-Jun-22 1:23
Member 1568985228-Jun-22 1:23 
AnswerRe: is there any code for capture screenshot and retrive system information in .net mvc core? Pin
Richard Deeming28-Jun-22 2:00
mveRichard Deeming28-Jun-22 2:00 
Questionaspnet core use TempData error! Pin
Member 940386815-Jun-22 21:21
Member 940386815-Jun-22 21:21 
AnswerRe: aspnet core use TempData error! Pin
Richard Deeming15-Jun-22 22:20
mveRichard Deeming15-Jun-22 22:20 
AnswerRe: aspnet core use TempData error! Pin
Mycroft Holmes16-Jun-22 13:41
professionalMycroft Holmes16-Jun-22 13:41 
QuestionSELECT DISTINCT Pin
kjell.ek19-May-22 4:16
kjell.ek19-May-22 4:16 
SELECT DISTINCT does not work the way I want.
SELECT DISTINCT works for the class column but not for name_event column
If "MyId" is e.g. CW and there are 4 lines there but name_event should only be 2 pcs, but it shows 4 pcs

Now display:
World Championships
French Champioships
World Championships
World Championships


It should be:
World Championships
French Champioships

What am I doing wrong?





VB
<pre>        Dim MyDataAdapter As New SqlDataAdapter("SELECT DISTINCT class, nationality, name_event from statistics_results Where class = @class", MyConnection)

        MyDataAdapter.SelectCommand.Parameters.Add(New SqlParameter("@class", SqlDbType.VarChar, 10))
        MyDataAdapter.SelectCommand.Parameters("@class").Value = MyId

        Try
            Dim dt As New DataTable()
            MyDataAdapter.Fill(dt)

            Dim natlist = dt.AsEnumerable().[Select](Function(r) r("nationality").ToString())
            Dim natvalue As String = String.Join("- ", natlist)
            litNat.Text = natvalue

            Dim eventlist = dt.AsEnumerable().[Select](Function(r) r("name_event").ToString())
            Dim eventvalue As String = String.Join("<br>", eventlist)
            litEvent.Text = eventvalue

        Catch exc As SqlException

        Finally
            MyConnection.Close()
            MyConnection.Dispose()

        End Try


AnswerRe: SELECT DISTINCT Pin
Ron Nicholson19-May-22 7:21
professionalRon Nicholson19-May-22 7:21 
AnswerRe: SELECT DISTINCT Pin
Member 1562749519-May-22 12:11
Member 1562749519-May-22 12:11 
GeneralRe: SELECT DISTINCT Pin
Richard Deeming19-May-22 22:42
mveRichard Deeming19-May-22 22:42 
GeneralRe: SELECT DISTINCT Pin
kjell.ek20-May-22 3:58
kjell.ek20-May-22 3:58 
GeneralRe: SELECT DISTINCT Pin
Alaren23-Jun-22 6:23
Alaren23-Jun-22 6:23 
QuestionMilliseconds from excel Pin
kjell.ek16-May-22 11:10
kjell.ek16-May-22 11:10 
AnswerRe: Milliseconds from excel Pin
Richard Deeming16-May-22 22:35
mveRichard Deeming16-May-22 22:35 
GeneralRe: Milliseconds from excel Pin
kjell.ek17-May-22 0:15
kjell.ek17-May-22 0:15 
AnswerRe: Milliseconds from excel Pin
Raj Kumar7918-Oct-22 6:12
Raj Kumar7918-Oct-22 6:12 
QuestionASP.NET Gridview load data Pin
Herman<T>.Instance28-Apr-22 4:16
Herman<T>.Instance28-Apr-22 4:16 
AnswerRe: ASP.NET Gridview load data Pin
Richard Deeming28-Apr-22 5:40
mveRichard Deeming28-Apr-22 5:40 
GeneralRe: ASP.NET Gridview load data Pin
Herman<T>.Instance2-May-22 1:47
Herman<T>.Instance2-May-22 1:47 
GeneralRe: ASP.NET Gridview load data PinPopular
Dave Kreskowiak2-May-22 3:12
mveDave Kreskowiak2-May-22 3:12 
GeneralRe: ASP.NET Gridview load data Pin
Herman<T>.Instance2-May-22 4:23
Herman<T>.Instance2-May-22 4:23 
GeneralRe: ASP.NET Gridview load data Pin
Herman<T>.Instance3-May-22 5:46
Herman<T>.Instance3-May-22 5:46 
GeneralRe: ASP.NET Gridview load data Pin
Richard Deeming3-May-22 6:31
mveRichard Deeming3-May-22 6:31 
GeneralRe: ASP.NET Gridview load data Pin
Herman<T>.Instance3-May-22 6:38
Herman<T>.Instance3-May-22 6:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.