.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

datalist printOut() function Problem

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :ASP.Net
  • i m using below code..by using it i able to write asp data into word file n format it.but i m facing problen in print out..

    it show exception

    Message = "The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))"

    please hav a look at below code....

  •  .................div data...................   
  •   <div id="printdiv" runat="server">   
  •     <table style="border: 5px solid #FF00FF; width:100%">   
  •     <tr>   

  • View Complete Post

  • More Related Resource Links

    datalist image slide show problem


    hi friends

    i am binding  images dynamically(back end)for a datalist .iam applying a slideshow for it .I am getting a problem to apply slideshow for dyanmically binded images.If the define in a div statically it working perfectly

    for example pls go through my code below:

    <script type="text/javascript">
    $(document).ready(function() {
            fx: 'scrollLeft' // choose your transition type, ex: fade, scrollUp, shuffle, etc...

    <div class="slideshow">
            <img src="images/30_dummy.jpg" width="200" height="200" />
            <img src="images/aquarius.gif" width="200" height="200" />
            <img src="images/star.gif" width="200" height="200" />
            <img src="images/the-proud-indian-flag-1.jpg" width="200" height="200" />

    I above code works perfectly and the slide show e

    EF 4: Function Import problem with Stored Procedures


    I have the following SP which includes a temp table:

     DECLARE @pos int

    --create table to hold parsed values
    CREATE TABLE #list (val varchar

    javascript function not working with datalist


    I have a datalist and there is a check box within this datalist in a .ascx page.  But I have to have an image out side the datalist.  So here is the code and its not owrking.  When I click on the image, I dont see any alert box. 


    <script Language="JavaScript" type="text/javascript">


    function validate_checkbox()



    // set var checkboxSelect to zero

    var checkboxSelect = 0;

    var sProducts = "";


    var multiCheck = window.document.forms["frmCompare"].CompareCheck.length;


    if (multiCheck != null)


        // Loop from zero to the one minus the number of checkbox button selections

        for (counter = 0; counter < window.document.forms["frmCompare"].CompareCheck.length; counter++)


            if (window.document.forms["frmCompare"].CompareCheck[counter].checked)


                var seperator = (checkboxSelect > 0)?",":"";

                sProducts += sep

    table valued function problem

    This is my table-valued function Problem is it is returning only 1 record but it is supposed to return more than one i stuck with this problem plz replyALTER function [dbo].[funcqidata](@dst int,@mth int,@yer int) returns @cqi_rpt table ( hosp_name varchar(100) NULL, bedded_strength int NULL, out_patients int NULL, in_patients int NULL, minor_surgeries int NULL, major_surgeries int NULL, deliveries int NULL, radio int NULL, lab_test int NULL, tot_part1 int NULL, waste_man int NULL, swab_test int NULL, attendence int NULL, drug int NULL, charges_thismonth int NULL, charges_lastmonth int NULL, usr_charges_marks int NULL, tot_part2 int NULL --grand_tot int NULL ) as BEGIN DECLARE @hosp_name varchar(100), @bedded_strength int, @out_patients int, @in_patients int, @minor_surgeries int, @major_surgeries int, @deliveries int, @radio int, @lab_test int, @tot_part1 int, @opd_handled int, @opd_target int, --------- supporting variables declared for calculation ----------- @ipd_handled int, @ipd_target int, @minor_handled int, @minor_target int, @major_handled int, @major_target int, @delivery_handled int, @delivery_target int, @radio_handled int, @radio_target int, @lab_handled int, @lab_target int, -------- end of declaring variables ----------------------------- @check_charges int, @waste_man int, @swab_test int,

    DataList and DetailsView problem

    I have a problem hooking up the datalist to the details view. I know everything server side is fine cause the default values work, but I guess I am not getting post back from the datalist. Here is my code.<div id="thumbnail">                     <asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource2"                          RepeatDirection="Horizontal" DataKeyField="ItemsID">                         <ItemTemplate>                             <asp:ImageButton ID="Image1" runat="server" ImageUrl='<%# "Handler.ashx?ItemsID=" + Eval("ItemsID")%>'/>                             <asp:Button ID="button1" runat="server" Text='<%# Eval("ItemsID") %>' />                         </ItemTemplate>                     </asp:Dat

    Problem with appointment function

    I am beginner of asp.net and c#Currently i am learning on create a website with appointment feature. The website i am doing basically a dental appointment web, which show the free slot of dentist on the website and enable patient to book appointment by schedule an appointment based on time and date given. I have done others thing such as register, login, report those however i have no idea on doing the appointment module. I am trying to learn easy way to create booking feature for dental website. Is that a tutorial on learning to do this or others way which i can easily learn it. Thank you.

    Problem with IndexOf function in Java script?


    Hi all,  i have one problem while using Index Of function in java script. I am using this in this way:

    var ss=(document.getElementById('<%=HiddenField1.ClientID%>').value.indexOf(","+document.getElementById('<%=yyy.ClientID%>').value+"-"+document.getElementById(str).value,20));                       

    Problem with datalist paging


    I having a little problem to get the paging for my datalits to work. I have used this article: http://aspalliance.com/157 which i found do the things i wanted. I have implemented the code but no records show at all.. No errors.. Can anybody see what i have done wrong? Thank you!

    Here is my aspx code:

    <h2 align="center"><font face="verdana">Paging in DataList</font></h2>
    <a name="this"></a>
    <asp:DataList ID="dList" Runat="server" Width="100%"
    <table width="100%" style="font: 10pt verdana" cellpadding=0 cellspacing=0>
    <tr style="background-color:FF0000">
    <th align=left><font color="#FFFFFF">Store ID</font></th>
    <th align=left><font color="#FFFFFF">Order Number</font></th>
    <tr style="background-color:#f5f5dc">
    <td><%#DataBinder.Eval(Container.DataItem, "pName")%></td>

    function & datalist


    I have a function called selType that returns either "mc" or "car"

    Then in my datalist i would like to check if the function returns "mc" it should output pName, else pNameFI from my db.

    I need something like this..

    <%# if selType="mc","pName","pNameFI") %>

    But this don't work.. I don't know how to achieve this.. Can anyone help me?

    problem with datalist in updatepanel


    Hi! i try to make a search part. there is a textbox which will be used for search context. also, i need to list category names. i don't use dropdownlist because its styles(for example border-style)doesn't change. So i tyr to do like this:i use a label and datalist. when clicking the label, datalist is showing. when i click the category name on datalist, it will be shown on label.(label is not in datalist.)my problem starts at that point. when i click category name on datalist , page is being postback. so i put datalist into updatepanel. but this time , i click category name on datlist,nothing occurs.(category name doesn't shown on label).my code is below:

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    Problem with WCF CallBack function



    I have a problem with WCF CallBack function (DuplexChannel). The main problem is that when I invoke that method on the client I got a message format like that below:

    <ClientCallBackFunc xmlns="http://tempuri.org/ ">

    where ClientCallBackFunc is name of callback method.

    I made service:

    public interface IClientCallBack



        void ClientCallBackFunc(string IssueId, string AgreementId, string LimitId);




    public interface IService


        string ServerMethod(string IssueId, string AgreementId, string LimitId);


    but I should prefer to get like this:




    So, when I want send message from server side (callba

    function problem



    i have the following function in my app_code which gets the data from database with datareader

    now on anothe page i need to output all of the data to a label

    i do not want to use datalist or gridview

    hwo should i do this?

    the function loops through the data ,i can put the function on the same page and use label.text += mydata

    but since it's a function and i want to use it on other pages how is it possible?

    Public Function getMembers(ByVal userID As Integer) As Boolean
                Dim Conn As New SqlConnection(HttpRuntime.Cache("con"))
                Dim dr As SqlDataReader
                Dim strSQL As String
                strSQL = "select * from test "
                Dim cmd As New SqlCommand(strSQL, Conn)
                cmd.Parameters.Add(New SqlParameter("@userID", userID))
                dr = cmd.Execute

    Problem with ISNumeric function in SQL Server 2005


    Even though the system function IsNumeric('2,344') returns a true in SQL Server 2005, why does the following throw an error? Is there a special way to cast to numeric types in SQL Server 2005, so the statement below does not throw an error?

              WHEN 1 THEN CAST('2,344' AS INT)
              ELSE NULL

    Star rating in Datalist problem


    I have a user comments area that people can add their comments to the page.  I have successfully gotten the star rating to save into the database.  I now want to display the star rating into a datalist.

    Here is what I have so far:

    <asp:DataList ID="DataList1" runat="server" CellPadding="3"
                    DataSourceID="dsHotelComments" Visible="False" BackColor="White"
            BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
        GridLines="Horizontal" Width="843px">
                    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                    <AlternatingItemStyle BackColor="#F7F7F7" />
                    <ItemStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                    <SelectedItemStyle BackCo

    Searching Function Problem - Setting up indexer


    How do you set up an indexer for Sharepoint 2010 Foundations?

    Problem filling labels with table data outside datalist using single call to db


    On a single page, I'd like to fill 2 hyperlink controls as well as a datalist control with table data using one call to the database. The page looks like this:

    <div id="PageContent">    
          Please select the district you wish to view below.</p>
          <asp:DropDownList ID="ddlDistrict" runat="server" CssClass="textbox" 
            DataTextField="DistrictName" DataValueField="DistrictId" AutoPostBack="True" 
        <p><asp:label ID="lblDistrictAbbrev" runat="server" Text="District Abbreviation: " />
          <asp:hyperlink ID="hyperlinkDistrictName" runat="server" 
            Text='' NavigateUrl="~/Contact/NationalCouncil.aspx" 
            Font-Bold="True" />
        <p><asp:label ID="lblDistrictCouncillor" runat="server" Text="District Councillor: " />
          <asp:hyperlink ID="hyperlinkCouncillor" runat="server" 
            Text='' NavigateUrl="~/Contact/NationalCouncil.a

    rand function problem



    i use the following code which loops through the numbers of a listbox and adds records to a database

    in the db i use the rand function to add a unique id to msgID field which accepts unique values

    but when the records are more than 1 or 2 i get error which says Cannot insert duplicate key row in object

    which means the rand function adds the same values

    how should i solve the problem??

    IF EXISTS (SELECT * FROM sysobjects   WHERE name = 'Message'   AND type = 'P')

      @Message ntext
      Insert into CmmNet_inbox (MsgID,Message) values (round(RAND()*10000000000,0),@message)

      Dim ctr As Integer
                        For ctr = 0 To ListFriends.Items.Count() - 1
                            If ListFriends.Items(ctr).Selected Then

    ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
    Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend