Try free Html editors http://tinymce.moxiecode.com/[^] CKEditor OpenBEXI AtomWrite
jayantbramhankar
Posts
-
HTML Editor -
Get hirarchy queryTo 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
ENDand 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 -
Getting a value from a constructorpolzisce 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..
-
image path in web.configadd slash(/) between Tild(~) and folder name it should be like..
Image1.ImageUrl="~/test/cric.gif"
-
How we send multiple smsyou can append semicolon ";" with the number... ex:- 9876543210;9812345665;98798790 Most of gateway providers provides this facility..
-
windowsmediaplayer not playing in mozillaa firefoxtry this html code, it's working fine in mozila..
-
How to get the index of the gridview with click of asp buttontry 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.
-
cannot connect to sqlserver 2005Put your connection string here, so we can go through it.