I am trying to build a dynamic menu that is looped between HTML TD tags.
Below is the code to execute the stored procedure that gets the submenus
that a user has access to. In PHP what I am trying to accomplish was much
easier, but didn't use stored procedures. What do I need to do in C#/ASP.NET
to create a dynamic horizontal menu from a stored procedure? The fileds I
need for the link are SubMenuID = (int) rs["SubMenuID"], Menu = (string)
rs["Menu"], and URL = (string) rs["URL"].
proc = "GetSubMenuAccess";
SqlCommand cmd = new SqlCommand(proc, conn);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter p1 = new SqlParameter("@ParentID", _MenuID);
p1.Direction = ParameterDirection.Input;
SqlParameter p2 = new SqlParameter("@UserID", _UserID);
p2.Direction = ParameterDirection.Input;
cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
SqlDataReader rs;
Thank you,
Ryan Olshan
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/