Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

jayantbramhankar

@jayantbramhankar
About
Posts
8
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • HTML Editor
    J jayantbramhankar

    Try free Html editors http://tinymce.moxiecode.com/[^] CKEditor OpenBEXI AtomWrite

    ASP.NET html question

  • Get hirarchy query
    J jayantbramhankar

    To get result, you need to write recursive function A function to get Parent

    CREATE FUNCTION dbo.FindRoot(@id int)
    RETURNS int
    AS
    BEGIN
    DECLARE @Id_parent int
    SELECT @Id_parent= Id_parent
    FROM TableName
    WHERE id = @id
    WHILE @Id_parent <> NULL
    BEGIN
    SELECT @id = @Id_parent
    SELECT @Id_parent = Id_parent
    FROM PrimeInfo
    WHERE id = @id
    END
    RETURN @id
    END

    and then store procedure to extract your data by providing id value

    CREATE PROCEDURE BuildTree(@id int)
    AS
    SET NOCOUNT ON
    CREATE TABLE #results(level int, id int, id_parent int)
    DECLARE @id_parent int
    DECLARE @level int
    SELECT @level = 1
    DECLARE @root int
    SELECT @root = dbo.FindRoots(@id)
    CREATE TABLE #stack (id int, level smallint)
    INSERT INTO #stack VALUES (@root, @level)
    WHILE @level > 0
    BEGIN
    IF EXISTS (SELECT * FROM #stack WHERE level = @level)
    BEGIN
    SELECT @id = s.id, @id_parent= IsNull(t.id_parent, 0)
    FROM #stack s INNER JOIN TableName t
    ON t.id = s.id
    WHERE level = @level
    INSERT INTO #results VALUES (@level, @id, @id_parent)
    DELETE FROM #stack
    WHERE level = @level
    AND id = @id
    INSERT #stack
    SELECT id, @level + 1
    FROM TableName
    WHERE id_parent = @id
    IF @@ROWCOUNT > 0
    BEGIN
    SELECT @level = @level + 1
    END
    END--IF EXISTS
    ELSE
    BEGIN
    SELECT @level = @level - 1
    END
    END -- WHILE
    SELECT id, id_parent, level FROM #results

    Database database question

  • Getting a value from a constructor
    J jayantbramhankar

    polzisce isn't two dimensional array.. matrika is two dimesional, and if you want to access it make it member of class and write a method..

    C# question data-structures

  • image path in web.config
    J jayantbramhankar

    add slash(/) between Tild(~) and folder name it should be like..

    Image1.ImageUrl="~/test/cric.gif"

    ASP.NET database help tutorial

  • How we send multiple sms
    J jayantbramhankar

    you can append semicolon ";" with the number... ex:- 9876543210;9812345665;98798790 Most of gateway providers provides this facility..

    ASP.NET csharp asp-net json

  • windowsmediaplayer not playing in mozillaa firefox
    J jayantbramhankar

    try this html code, it's working fine in mozila..

    Web Development com csharp help announcement

  • How to get the index of the gridview with click of asp button
    J jayantbramhankar

    try this, Add commandArgument in tag

    <asp:Button ID="Button1" runat="server" Text='<%#Eval("YourDataFiled")%>'

                  CommandArgument = "Button1"  OnClick = "Button1\_Click" /> 
    

    c# code

    protected void Button1_Click(object sender, EventArgs e)
    {
    Button button = (Button)sender;

        string CommandName = button.CommandName;
    
        string CommandArgument = button.CommandArgument;
        int index = Int32.parse(button.CommandArgument);
    
    
    } 
    

    Hope this helps.

    ASP.NET database tutorial

  • cannot connect to sqlserver 2005
    J jayantbramhankar

    Put your connection string here, so we can go through it.

    ASP.NET help csharp database sql-server visual-studio
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups