Lets Have a fun with Technology.

BTemplates.com

Follow by Email

Tuesday, September 2, 2008

7 comments:

  1. hi anish here, How to get event of hyperlink when it is clicked in the datagrid view

    ReplyDelete
  2. Hello Anish,

    Do one Thing In Gridview Add Once column.Give Command name On it on Gridview Fire That Event For Example if you Are give command name Edit then Handle GridviewEditRow Hear you Can Write your Logic.

    Another Simple Method Is Add Linkbutton on ItemTemplet and Double Click on it.This is Your event handler write Down Your code Here.

    Enjoy ..........

    ReplyDelete
  3. Hello There,

    How to Write NewLine In Textfile from C#.

    Following Are Code For AppendData in Textfile.

    System.IO.File.AppendAllText(Application.StartupPath + "/" + "config.txt", ctlServerAddress.Text);
    System.IO.File.AppendAllText(Application.StartupPath + "/" + "config.txt", ctladdd.Text);

    Now i want to Both write in Seperat Line


    How i do that ??

    ReplyDelete
  4. Hello There,

    Use Environment.Newline For Wriite in New Line.

    Example :-

    system.IO.File.AppendAllText(Application.StartupPath + "/" + "config.txt", ctlServerAddress.Text);

    System.IO.File.AppendAllText(Application.StartupPath + "/" + "Log.txt", Environment.NewLine);

    System.IO.File.AppendAllText(Application.StartupPath + "/" + "config.txt", ctladdd.Text);

    System.IO.File.AppendAllText(Application.StartupPath + "/" + "Log.txt", Environment.NewLine);

    ReplyDelete
  5. DECLARE @TestingTable AS TABLE (StartKms INT, EndKms INT)

    INSERT INTO @TestingTable

    SELECT 10, 20 UNION ALL
    SELECT 40, 48 UNION ALL
    SELECT 48, 61 UNION ALL
    SELECT 61, 90 UNION ALL
    SELECT 100, 120 UNION ALL
    SELECT 120, 130

    DECLARE @StartKMs INT,
    @EndKms INT


    SET @StartKMs = 21
    SET @EndKms = 28

    SELECT StartKMs, EndKms
    FROM @TestingTable
    WHERE
    CASE
    WHEN @StartKMs <> EndKms
    AND @EndKms <> StartKMs
    THEN StartKMs
    END BETWEEN @StartKMs AND @EndKms
    OR
    CASE
    WHEN @StartKMs <> EndKms
    AND @EndKms <> StartKms
    THEN EndKms
    END BETWEEN @StartKMs AND @EndKms


    IS there is any posiblility for converting to single case statement like this
    CASE
    WHEN @StartKMs <> EndKms
    AND @EndKms <> StartKMs
    THEN StartKMs or EndKms
    END BETWEEN @StartKMs AND @EndKms, BETWEEN @StartKMs AND @EndKms

    ReplyDelete
  6. I have a report viewer control,from which i need to generate mutiple reports for all the records that i am getting from my store procedure.For this,i tried 3 options.
    1.Place the main report in a table detail(which will be in another report) ,and pass the Uid(unique identifier)
    to that table.
    Result--> giving an exception which says "exception unhandled by user code"
    2.Tried the same thing as 1st with a list instead of table.
    Result--> giving the same kind of exception.
    3.Placed the main report in another report making this main report as subreport.
    Result-->Only one report is being displayed for the last record that i get from my store procedure.
    Please let me know if you have any solution, or
    please advise any other option.I will give a try.

    Naveen Pratapaneni,
    Naveenp@US.IBM.COM

    ReplyDelete
  7. naveen call me asap
    vara prasad
    703-953-1568

    ReplyDelete