To avoid data to show in a datalist

I want to show some data by datalist. But some of them have to avoid.
That is I want to show data without some data.
Clearly I want to make a friend list so I have to show users from data base.
But some friend who are already friend with him are not to show.
So how can I avoid this users to show in add friend list.

 <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" style="margin-left: 185px">
                    <ItemTemplate>
                        <table class="auto-style2">
                    <tr>
                        <td><asp:Label ID="fnameLabel" runat="server" Text='<%# Eval("fname") %>' />
                        <asp:Label ID="lnameLabel" runat="server" Text='<%# Eval("lname") %>' /></td>
                        <td style="text-align:right"><asp:Button Text="Add as friend" ID="btnAddFriend" CommandArgument='<%# Eval("username") %>' 
                    OnClick="btnAddFriend_Click" runat="server" /></td>
                    </tr>
                </table>
                    </ItemTemplate>
                </asp:DataList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dbcon %>" SelectCommand="SELECT [fname], [lname],[username] FROM [Users]"></asp:SqlDataSource>
And this is the button function
protected void btnAddFriend_Click(object sender, EventArgs e)
        Button btnAddFriend = sender as Button;
        string userId = btnAddFriend.CommandArgument;
        using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["dbcon"].ToString()))
            cn.Open();
            String S = Session["user"].ToString();
            SqlCommand cmd1 = new SqlCommand("INSERT INTO Friend  values('" + Session["user"].ToString() + "','" + userId + "','pending')", cn);
            SqlDataReader rdr = cmd1.ExecuteReader(CommandBehavior.CloseConnection);
            cn.Close();
                            

Similar Messages

  • Foxpro Blank Date Field show as 30-DEC-1899 ?

    When I query and Insert Foxpro DBF Files Records into Oracle Database with Blank Date Field through Oracle Heterogeneous Connectivity, it shows as '30-DEC-1899', how can I avoid this and show as NULL ?
    Best Regards,
    Luqman

    Hi,
    I suspect that there is something wrong with your patterns (see Object > Field).
    I would set up the display and edit patterns to match how you want the data to display.
    Niall

  • I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date is created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    I have made a burn folder with photos exported from I-photo.  It now shows in information, that the date  created and modified is different from the original digitized date.  How can I get the original date to show in the info from Finder?

    The Finder reports File information. The date and time of the photo are in the Photo's Exif metadata. The Finder has no awareness of this. All photos apps on any system do.
    Regards
    TD

  • SSRS pulls data from ESSBASE cube, data not showing

    Dear Experts,
    We are connecting SSRS 2012 to Essbase 11.1.3 to pull data from the cube, and having some issues with some members data not showing in the query designer and report, while some have no problem. And we couldn't find a pattern on which members won't show. We are wondering if this is a known issue and if there is a way to solve the problem.
    Thanks very much.
    Grace

    Hi ,
    Check the following:-
    1 Check whether you have made the joins properly.
    2 Check data at multiprovider level .
    3 is data available for reporting in both the cubes
    Regards
    Rahul

  • TS3579 I found this useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up

    I found this  (TS3579: If the wrong date or time is displayed in some apps on your Mac Learn about If the wrong date or time is displayed in some apps on your Mac) useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up in Finder. 

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • ITunes shows that there are no songs on my iphone but there are 274 songs there. The data storage shows up as "other" on iTunes. I just want to clear the music on my phone but  I can't seem to do so. Is there any way to do this?

    iTunes shows that there are no songs on my iphone but there are 274 songs there. The data storage shows up as "other" on iTunes. I just want to clear the music on my phone but  I can't seem to do so. Is there any way to do this? You used to be able to swipe and delete a song straight from your phone but I can't seem to do that anymore.

    That is stealing.

  • XMP data not showing up in the custom file info panels when upgraded to CC

    For several versions of Photoshop, I have been able to use a modified custom file info panel to input, update, and track psd files. With each version of photoshop there are always some changes in the way the object data is handled. The lastest challenge is:
    1. XMP data not showing up in the custom file info panels when upgraded CC from CS6.
    2. Raw data is not visible in CC in the File info panel.
    3. This occurs in new documents where we create the xmp wrapper while the file template is built.
    4. When metadata is manually entered into the file, the data is not added to the XMP wrapper when it is recreated on the save.
    5. When a file that was created in CS6 is opened that contains the Metadata in the file info template. It is visible. the Raw data is also visible. Once the XMP wrapper is recreated - write and then close. The data is no longer available. the Raw data will not pull up in the file info panel.
    Any feedback or a direction will be appreciated.

    I have a script that the user runs to input xmp data into a Customized version of the generic file info panel. it is data that is gathered from the user when the psd file is created. once the file is open in photoshop. the information is visible in the File info panel , the raw data, and as a schema addition in the advanced tab.
    in CC the nodes and the children of the XMP packet have changed positions. so that the XML -this.XMP.child(0).appendChild(this.createNode())
    is no longer the node that can be appended.
    Where XML.child(0).elements().length(); would enable the xmlns to be added in CS6
    <rdf:Description xmlns:phsa="' + this.namespace + '" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:x="adobe:ns:meta/" rdf:about="" />'
    it is visible in CC as namespace in a different arrangement. XML.child(0).child(0).namespaceDeclarations().toString()) and the children are  XML.child(0).child(0).elements().length().toString()); There are now 7 child nodes where before there were 1.
    with all shifted, the initialize of the values and the delete XMP packet wrapper and create new or the amend to the XMP packet wrapper is undefined.

  • APD issue, Data not showing correctly in APD.

    Hi All,
    Please guys help me with this APD issue that I am facing.
    There is an APD created whose target is a file and with one routine. Here the purpose of the routine was mostly just to sequence the fields the way I want them, and only to show certain ones, also to delete all KF that are zero.(which is commented out).
    No matter what I do, it always gets data which has the key figures as all zeros.  I put some code in there to delete the data which is all zeros but commented it out, because otherwise then it writes zero records.
    The code part which delete all KF that are zero is commented out. Now we are getting the file data with commented code and without commenting code same.
    The thing is, in Bex the query from which we are fetching data is showing proper data with zeroes as well as KF with values. But the same APD is showing only the data whose KF's are zeroes.
    I am pasting the routine here:
    REPORT RSAN_WB_ROUTINE_TEMP_REPORT .
    TYPES: BEGIN OF y_source_fields ,
             COUNTRY TYPE /BI0/OICOUNTRY ,
             SALESORG TYPE /BI0/OISALESORG ,
             /BIC/ZFCSTGRP TYPE /BIC/OIZFCSTGRP ,
             PLANT TYPE /BI0/OIPLANT ,
             MATERIAL TYPE /BI0/OIMATERIAL ,
             FISCPER TYPE /BI0/OIFISCPER ,
             KYF_0001 TYPE /BIC/OIZBAS_FCST ,
             KYF_0002 TYPE /BIC/OIZTUN_QTY ,
             KYF_0002_UNIT TYPE MEINS ,
             KYF_0003 TYPE /BIC/OIZCOR_FCST ,
             KYF_0004 TYPE /BIC/OIZTOT_FRCT ,
             KYF_0005 TYPE /BIC/OIZTER_TFCT ,
           END OF y_source_fields .
    TYPES: yt_source_fields TYPE STANDARD TABLE OF y_source_fields .
    TYPES: BEGIN OF y_target_fields ,
             COUNTRY TYPE /BI0/OICOUNTRY ,
             SALESORG TYPE /BI0/OISALESORG ,
             /BIC/ZFCSTGRP TYPE /BIC/OIZFCSTGRP ,
             PLANT TYPE /BI0/OIPLANT ,
             MATERIAL TYPE /BI0/OIMATERIAL ,
             FISCPER TYPE /BI0/OIFISCPER ,
             ZBAS_FCST TYPE /BIC/OIZBAS_FCST ,
             ZTUN_QTY TYPE /BIC/OIZTUN_QTY ,
             BASE_UOM TYPE /BI0/OIBASE_UOM ,
             ZCOR_FCST TYPE /BIC/OIZCOR_FCST ,
             ZTOT_FRCT TYPE /BIC/OIZTOT_FRCT ,
             ZTER_TFCT TYPE /BIC/OIZTER_TFCT ,
           END OF y_target_fields .
    TYPES: yt_target_fields TYPE STANDARD TABLE OF y_target_fields .
    Begin of type definitions -
    *TYPES: ...
    End of type definitions -
    FORM compute_data_transformation
         USING     it_source TYPE yt_source_fields
                   ir_context TYPE REF TO if_rsan_rt_routine_context
         EXPORTING et_target TYPE yt_target_fields .
    Begin of transformation code -
      DATA: ls_source TYPE y_source_fields,
            ls_target TYPE y_target_fields.
      LOOP AT it_source INTO ls_source.
       IF ls_source-KYF_0001 = 0
       AND ls_source-KYF_0002 = 0
       AND ls_source-KYF_0003 = 0
       AND ls_source-KYF_0004 = 0
       AND ls_source-KYF_0005 = 0.
         DELETE it_source.
         EXIT.
       ENDIF.
        MOVE-CORRESPONDING ls_source TO ls_target.
        APPEND ls_target TO et_target.
      ENDLOOP.
    End of transformation code -
    ENDFORM.
    End of transformation code -
    ENDFORM.
    Please help me and reply. Good answers are appreciated and rewarded with points.
    Thanks,
    Sumisha Subramanian.

    Hi All,
    Please guys help me with this APD issue that I am facing.
    There is an APD created whose target is a file and with one routine. Here the purpose of the routine was mostly just to sequence the fields the way I want them, and only to show certain ones, also to delete all KF that are zero.(which is commented out).
    No matter what I do, it always gets data which has the key figures as all zeros.  I put some code in there to delete the data which is all zeros but commented it out, because otherwise then it writes zero records.
    The code part which delete all KF that are zero is commented out. Now we are getting the file data with commented code and without commenting code same.
    The thing is, in Bex the query from which we are fetching data is showing proper data with zeroes as well as KF with values. But the same APD is showing only the data whose KF's are zeroes.
    I am pasting the routine here:
    REPORT RSAN_WB_ROUTINE_TEMP_REPORT .
    TYPES: BEGIN OF y_source_fields ,
             COUNTRY TYPE /BI0/OICOUNTRY ,
             SALESORG TYPE /BI0/OISALESORG ,
             /BIC/ZFCSTGRP TYPE /BIC/OIZFCSTGRP ,
             PLANT TYPE /BI0/OIPLANT ,
             MATERIAL TYPE /BI0/OIMATERIAL ,
             FISCPER TYPE /BI0/OIFISCPER ,
             KYF_0001 TYPE /BIC/OIZBAS_FCST ,
             KYF_0002 TYPE /BIC/OIZTUN_QTY ,
             KYF_0002_UNIT TYPE MEINS ,
             KYF_0003 TYPE /BIC/OIZCOR_FCST ,
             KYF_0004 TYPE /BIC/OIZTOT_FRCT ,
             KYF_0005 TYPE /BIC/OIZTER_TFCT ,
           END OF y_source_fields .
    TYPES: yt_source_fields TYPE STANDARD TABLE OF y_source_fields .
    TYPES: BEGIN OF y_target_fields ,
             COUNTRY TYPE /BI0/OICOUNTRY ,
             SALESORG TYPE /BI0/OISALESORG ,
             /BIC/ZFCSTGRP TYPE /BIC/OIZFCSTGRP ,
             PLANT TYPE /BI0/OIPLANT ,
             MATERIAL TYPE /BI0/OIMATERIAL ,
             FISCPER TYPE /BI0/OIFISCPER ,
             ZBAS_FCST TYPE /BIC/OIZBAS_FCST ,
             ZTUN_QTY TYPE /BIC/OIZTUN_QTY ,
             BASE_UOM TYPE /BI0/OIBASE_UOM ,
             ZCOR_FCST TYPE /BIC/OIZCOR_FCST ,
             ZTOT_FRCT TYPE /BIC/OIZTOT_FRCT ,
             ZTER_TFCT TYPE /BIC/OIZTER_TFCT ,
           END OF y_target_fields .
    TYPES: yt_target_fields TYPE STANDARD TABLE OF y_target_fields .
    Begin of type definitions -
    *TYPES: ...
    End of type definitions -
    FORM compute_data_transformation
         USING     it_source TYPE yt_source_fields
                   ir_context TYPE REF TO if_rsan_rt_routine_context
         EXPORTING et_target TYPE yt_target_fields .
    Begin of transformation code -
      DATA: ls_source TYPE y_source_fields,
            ls_target TYPE y_target_fields.
      LOOP AT it_source INTO ls_source.
       IF ls_source-KYF_0001 = 0
       AND ls_source-KYF_0002 = 0
       AND ls_source-KYF_0003 = 0
       AND ls_source-KYF_0004 = 0
       AND ls_source-KYF_0005 = 0.
         DELETE it_source.
         EXIT.
       ENDIF.
        MOVE-CORRESPONDING ls_source TO ls_target.
        APPEND ls_target TO et_target.
      ENDLOOP.
    End of transformation code -
    ENDFORM.
    End of transformation code -
    ENDFORM.
    Please help me and reply. Good answers are appreciated and rewarded with points.
    Thanks,
    Sumisha Subramanian.

  • LSMW - Read Data not showing in Converted Data

    Hi,
    I am using LSMW to load data from a flat file (via recording).  I have it working except I have one issue.  When I display the data in read data all fields are showing.  No errors popup when I select convert data.  When I select display converted data the last few fields are missing.  Any ideas why or how to fix this?
    Any help is appreciated as I do not know how to proceed.
    Thanks,
    Annette
    Edited by: Annette Ameel on Dec 4, 2008 5:37 PM

    HI Bush,
    Currently I am also facing the same problem. In "display read data" it is showing all the field values. No error msg in "convert data". But only 2 fields are displaying in "display converted data". not showing any values in rest of the fields. Kindly suggest me how you fixed this problem

  • Proper Data Not showing in Preview Mode

    Hello,
    I'm using the Dashboard Design tool to create a dashboard with Input controls on 2 stack column charts.
    There are 7 Input Targets  pointing to 1st stack column chart, the SUM of all these targets need to be populated on one of the values in the second chart.
    e.i. Two stack column charts=Revenue By Month and Revenue By week
    Target Inputs  are pointed to Revenue By week, so target's which are assigned to each week of a certain month need to Sum and populate in 'Revenue by Month' chart, on top of the corresponding  month.
    I have all the logic inputted, when i edit values in the excel sheet, changes are occurring, all values are being populated in both charts. However, when i Preview the dashboard and input targets i am only seeing targets populating in "revenue by Week"  and 'Revenue By Month" is not populating any target data.
    Any idea's on why this might be?
    Thanks in advance for any feedback

    Hi Zena,
    It looks something is breaking within the formula or logic. Try the below steps to narrow down:
    1. Preview the swf in Xcelsius.
    2. Take the snapshot of data in Excel( File->Snapshot->current excel data).
    3. Check the data if showing correct in the excel sheet.
    This would also help you isolate which formula or function is breaking.
    Thanks,
    Amit

  • Date to show in MM/DD/YYYY format

    Hi all,
    I am stumped on this simple thing under BIP.How can I get the date to show in MM/DD/YYYY format under BIP ?
    Template is created under word, for the field under formatting, type: date, format:M/d/yyyy ( can't find MM/DD/YYYY). But when I browse the document, it always show as "DD-MON-YYYY" format.
    How to mitigate this ?
    Thanks
    Munshar

    Hi ,
    hey small mistake in my solution code,just change the format to dd/MM/yyyy (case sensitive code)then it will work
    to-char() is used to convert the Date or Number format type to displayable string format.
    In our case also it is coverting xml_date_filed into a string to the format of dd/MM/yyyy
    so you can try with this formula
    in Advanced tab write
    *<?xdofx:to_char(MY_DATE_FIELD,'dd/MM/yyyy')?>*
    or in properties tab ,under formatting section ,select type as DATE and write the format as dd/MM/yyyy
    best/Aravind
    Edited by: Aravind on Aug 18, 2011 9:58 AM, with correct solution

  • Date Picker - show specific month of perticaular year

    Hi Experts,
    I am using sam.m.DatePicker control. By default date picker show current month-year when user open date picker. I want to show specific month of specific year when date picker is open.
    for eg: In my app, if student appearing for next year exam(say 2016) then when he click on date picker it should show April of 2016 instead of april of 2015. I don't want to set date by default. Student should select that date manually.
    Is it possible to show specific month and year for date picker when it open.
    Thanks in advanced.

    Hi,
    you can also give a default date of the first date of that month.
    Why you are not using that?
    var datePicker = new sap.m.DatePicker({
                                            valueFormat: "yyyy-MM-dd",
                                            displayFormat: "long",
                                                   value: "2014-03-26"
    Regards
    Dhananjay

  • When I attempt to apply a lens profile in the Develop module the only choices are for the Fujifilm X100/S/T even though in the Library module the EXIF data correctly shows the camera as the X-T1 and the precise lens used to take the picture. How do I get

    When I attempt to apply a lens profile in the Develop module the only choices are for the Fujifilm X100/S/T even though in the Library module the EXIF data correctly shows the camera as the X-T1 and the precise lens used to take the picture. How do I get the right profile available?

    First, the required profile needs to be present. LR 5.4 supports the X-T1 in terms of understanding its Raw format, but will not come with a profile for every lens which can be mounted onto that.
    A profile is made for each specific lens, as mounted on a certain camera. It can also be used with pictures taken on a different (reasonably similar) camera body than the one originally used during profiling. This is subject to the sensor format: you can employ a given lens profile made for full frame, on an image from a crop sensor behind the same lens - but not vice versa.
    Next, the image type needs to correspond to the image type which has been built into the profile: Raw, or non-Raw.
    Lightroom offers only profiles of the right type for the image(s) concerned. There are many more provided for correcting camera Raw, than for correcting camera JPG. That is also the case with additional profiles, e.g. those accessed via the Adobe lens profile downloader utility.
    Finally, in the event that there simply is no profile out there for a given lens, it is not particularly difficult (though a little tedious) for the end user to generate one, using a further Adobe utility which is downloadable as a package, including a range of checkerboard calibration targets, each of which needs to be printed at a stated physical size.

  • Date popup shows centuries wrongly

    I have 2.1.0.62 version.
    Steps to reproduce the bug:
    1. Make sure you have double-digits year format in your NLS settings
    2. Execute follow script: select to_date('01-01-2210', 'MM-DD-YYYY') from dual;
    3. In the result pane double click on the date
    4. Click pencil button to open popup - you should see 2010, not 2210
    Four digits in year format will save the day.

    Chris,
    Why would you expect to see 2010 ?I didn't. And I was really confused when I saw it.
    if you are specifying the full year as 2210 the oracle will give you back 2210.
    If you want 2010 then type 2010.
    e.g. select to_date('01-01-2010', 'MM-DD-YYYY') from dual;
    What the query is returning is correct for the input as far as I can see.
    If you want the ensure the correct century is returned when you are not actually specifiying the century then use 'MM-DD-RRRR'
    e.g. select to_date('01-01-10', 'MM-DD-RRRR') from dual; returns 2010.Probably I didn't describe the bug clearly.
    WHEN date field in the result panel has date with centuries more then 0 AND your NLS date settings have two digits for year, like 'MM-DD-RR' THEN date popup shows date's year incorrectly.
    From my 1st message - it shows 2010 instead 2210.
    Here is screenshot: !http://i50.tinypic.com/24cd1te.png!

  • Empty date fields showing in receipt

    Why do empty date fields show in the email receipt even though I have the "Include empty fields" de-selected in the email receipts section? Example from receipt shown.
    Date 1: 09/13/2013
    Date 2: -
    Date 3: -
    Date 4: -

    Hi,
    You will get email receipt and email notification if you check both options. email notification will have all fields summary including empty ones if check the option include a summary of the response data in the email.
    email notification title is "form name": Response Received.
    email receipt title by default is Form Submission Receipt: Adobe FormsCentral
    Please share your form to me if you do see empty field in receipt without checked include empty fields. Here is my email address: [email protected]
    Thanks,

Maybe you are looking for

  • Help using a dynamic action to update tabular form items (specifically radio button) based on collection

    Hi Everyone, I have posted this question in the past and made huge progress with Denes Kubicek's help:  https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365::::: based on my earlier question posted: https://forums.oracle.com/forums/thread.j

  • Antivirus, Internet security, and anti-spyware

    Does anyone have any good suggestions for products that are a must have for Mac?? I'm getting a new MacBook Pro and I want it protected. Thanks so much!

  • Why doesn't  System Information.App provide battery serial?

    Why doesn't  System Information.App provide battery serial? Even /usr/sbin/system_profiler -detailLevel full doesn't show the battery serial. When I open System Information.App I get this output. Serial number ist not even displayed:

  • SAP HR in Saudi Arabia

    Hi, This is Praveen and i am currently working with a pharma company in Jeddah-Saudi Arabia. this is the first time i came to Middle east and i am unable to get standard data related to payroll and some other items regarding configuration. if you kno

  • Blue spots on Zen Micro scr

    Recently, a number of blue spots have appeared on my Zen Micro screen. These spots are there even when the player is off, and they're all clustered around the center of the screen. Any idea what they may be, or how to get rid of them?