Click here to Skip to main content
12,448,343 members (52,641 online)
   

ASP.NET

 
GeneralRe: ERROR while updating image in database Pin
Ani199110-Dec-12 21:15
memberAni199110-Dec-12 21:15 
GeneralRe: ERROR while updating image in database Pin
Richard Deeming11-Dec-12 0:54
memberRichard Deeming11-Dec-12 0:54 
GeneralRe: ERROR while updating image in database Pin
jkirkerx11-Dec-12 7:26
memberjkirkerx11-Dec-12 7:26 
Questionmaking a class with streamreader thread safe - perhaps using monitor or a singleton Pin
jkirkerx9-Dec-12 11:45
memberjkirkerx9-Dec-12 11:45 
GeneralRe: making a class with streamreader thread safe - perhaps using monitor or a singleton Pin
jkirkerx9-Dec-12 16:14
memberjkirkerx9-Dec-12 16:14 
QuestionDisplay Images from a database in a tile view Pin
Member 94655649-Dec-12 5:42
memberMember 94655649-Dec-12 5:42 
AnswerRe: Display Images from a database in a tile view Pin
Ali Al Omairi(Abu AlHassan)10-Dec-12 2:23
memberAli Al Omairi(Abu AlHassan)10-Dec-12 2:23 
Questionlinq connection in asp.net Pin
JonBrynjar8-Dec-12 3:58
memberJonBrynjar8-Dec-12 3:58 
Hi all!

I have established a linq connexion with my database with this code behind.
And with manually set paging for 10 records.
data is shown in ListView.
How do I get the header sorting I'm using a linkbutton. Also I want to be able to insert a dropdownlist in the header. How do I receive this functionality.
With thanks in advance.

private void DisplayData(int startRow)
    {
      using (Origo.Vefur.Linq.dbMainDataContext db = new Linq.dbMainDataContext(Origo.WMMain.Helpers.Global.ConnectionString))
      {
 
        var empList = from el in db.owm_USERs
                      where el.showOnWeb == 1
                      select el;
 
        //ListView1.DataSourceID(employeeList);
        ListView1.DataSource = empList.Skip(startRow).Take(10);
        ListView1.DataBind();
      }
    }

My list view looks now like this

<asp:ListView ID="ListView1" runat="server"
      onselectedindexchanged="ListView1_SelectedIndexChanged1"
      onsorted="ListView1_Sorted" onsorting="ListView1_Sorting">
      <LayoutTemplate>
        <table id="Table1" runat="server" class="TableCSS">
          <tr id="Tr1" runat="server" class="table-header">
            <th align="left"><asp:LinkButton ID="lnkID" CommandArgument="id" CommandName="Sort" Text="id" runat="server" /></th>
            <th align="left"><asp:LinkButton ID="lnkName" runat="server">Nafn</asp:LinkButton></th>
            <th align="left">
              <asp:dropdownlist runat="server" id="ddlWrokplace"
                  DataTextField="workplace" DataValueField='<%# Eval("workplace") %>' SelectedValue='<%# Eval("workplace") %>'></asp:dropdownlist>
            </th>


But neither the sorting links nor the dropdown list are working properly
AnswerRe: linq connection in asp.net Pin
@AmitGajjar11-Dec-12 7:00
member@AmitGajjar11-Dec-12 7:00 
QuestionChange root path Pin
John Simmons / outlaw programmer8-Dec-12 3:40
mvpJohn Simmons / outlaw programmer8-Dec-12 3:40 
AnswerRe: Change root path Pin
Richard Deeming10-Dec-12 1:35
memberRichard Deeming10-Dec-12 1:35 
GeneralRe: Change root path Pin
John Simmons / outlaw programmer10-Dec-12 1:42
mvpJohn Simmons / outlaw programmer10-Dec-12 1:42 
AnswerRe: Change root path Pin
@AmitGajjar11-Dec-12 7:10
member@AmitGajjar11-Dec-12 7:10 
QuestionUpdating the column using entity framework Pin
indian1437-Dec-12 12:46
memberindian1437-Dec-12 12:46 
Questionasp.NET composite control cannot raise an event Pin
michal.cerbak7-Dec-12 4:50
membermichal.cerbak7-Dec-12 4:50 
Questionhow to convert hex to rgb color code in asp.net Pin
Deenuji vellore6-Dec-12 23:14
groupDeenuji vellore6-Dec-12 23:14 
AnswerRe: how to convert hex to rgb color code in asp.net Pin
Richard MacCutchan7-Dec-12 0:32
mvpRichard MacCutchan7-Dec-12 0:32 
Questionasp.net threads, see if thread with same name is running to wait a couple of seconds Pin
jkirkerx6-Dec-12 10:45
memberjkirkerx6-Dec-12 10:45 
AnswerRe: asp.net threads, see if thread with same name is running to wait a couple of seconds Pin
Keith Barrow7-Dec-12 5:21
mentorKeith Barrow7-Dec-12 5:21 
GeneralRe: asp.net threads, see if thread with same name is running to wait a couple of seconds Pin
jkirkerx7-Dec-12 6:47
memberjkirkerx7-Dec-12 6:47 
QuestionPagination worries Pin
cizu6-Dec-12 5:12
membercizu6-Dec-12 5:12 
AnswerRe: Pagination worries Pin
deflinek7-Dec-12 1:40
memberdeflinek7-Dec-12 1:40 
AnswerRe: Pagination worries Pin
AnkitGoel.com10-Dec-12 17:33
memberAnkitGoel.com10-Dec-12 17:33 
QuestionHtml Mail Formate Error Pin
mukusingh5-Dec-12 18:49
membermukusingh5-Dec-12 18:49 
AnswerRe: Html Mail Formate Error Pin
jkirkerx6-Dec-12 10:41
memberjkirkerx6-Dec-12 10:41 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.160811.3 | Last Updated 26 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid