Click here to Skip to main content
15,890,527 members
Home / Discussions / ASP.NET
   

ASP.NET

 
JokeRe: Real time data transfer Pin
Vasudevan Deepak Kumar14-Oct-09 4:12
Vasudevan Deepak Kumar14-Oct-09 4:12 
GeneralRe: Real time data transfer Pin
Not Active14-Oct-09 6:02
mentorNot Active14-Oct-09 6:02 
AnswerRe: Real time data transfer Pin
Md. Marufuzzaman14-Oct-09 2:58
professionalMd. Marufuzzaman14-Oct-09 2:58 
AnswerReplication Pin
David Mujica14-Oct-09 3:37
David Mujica14-Oct-09 3:37 
QuestionString was not recognized as a valid DateTime." Pin
siddisagar14-Oct-09 0:11
siddisagar14-Oct-09 0:11 
AnswerRe: String was not recognized as a valid DateTime." Pin
meeram39514-Oct-09 0:31
meeram39514-Oct-09 0:31 
AnswerRe: String was not recognized as a valid DateTime." Pin
Christian Graus14-Oct-09 0:57
protectorChristian Graus14-Oct-09 0:57 
Questionpopulatemenu Pin
mylogics13-Oct-09 22:13
professionalmylogics13-Oct-09 22:13 
hi m using a menu control and populating the items and child items dynamically.
The items of menu are in cat1 table and the childitems are in cat2 table.
but when i run my code it only shows one item and the childitem of that item.
why does it not show the other items.tell me wr m i wrong....
thnks...
my code is:
public partial class MasterPage : System.Web.UI.MasterPage
{
    SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SilverOnline"].ConnectionString);
    protected void Page_Load(object sender, EventArgs e)
    {
        populatemenu();
    }
    private void populatemenu()
    {
        //SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Jajaipur"].ConnectionString);
        //Menu mnu = new Menu();
       
        SqlDataReader dr = null;
        string str = "Select * From Cat1";
        SqlCommand cmd = new SqlCommand(str, conn);
        conn.Open();
        dr = cmd.ExecuteReader();
        while (dr.Read())
        {
            MenuItem mt = new MenuItem();
            mt.Text = dr["CatName"].ToString();
            mt.Value = dr["Cat1ID"].ToString();
            mt.NavigateUrl = "Displaymenu.aspx?id=" + mt.Value;
            string s = mt.Value;
            conn.Close();
            string str1 = "Select * From Cat2 where(Cat1ID='" + s + "')";
            SqlCommand cmd1 = new SqlCommand(str1, conn);
            conn.Open();
            dr = cmd1.ExecuteReader();
            while (dr.Read())
            {
                MenuItem mf = new MenuItem();
                mf.Text = dr["Cat2Name"].ToString();
                mf.Value = dr["Cat2ID"].ToString();
                mf.NavigateUrl = "Displaysubmenu.aspx?id=" + mf.Value;
                mt.ChildItems.Add(mf);
                
            }
            
        }
        conn.Close();
        Menu1.Items.Add(mt);
        
        
    }
}

AnswerRe: populatemenu Pin
Abhijit Jana14-Oct-09 8:25
professionalAbhijit Jana14-Oct-09 8:25 
QuestionResult of web requst in a Fram on the same page Pin
ptr_Electron13-Oct-09 21:48
ptr_Electron13-Oct-09 21:48 
AnswerRe: Result of web requst in a Fram on the same page Pin
nagendrathecoder14-Oct-09 0:17
nagendrathecoder14-Oct-09 0:17 
QuestionResult of web request in a frame of current page Pin
ptr_Electron13-Oct-09 21:46
ptr_Electron13-Oct-09 21:46 
AnswerRe: Result of web request in a frame of current page Pin
Abhijit Jana14-Oct-09 8:27
professionalAbhijit Jana14-Oct-09 8:27 
QuestionMulti-Level-Marketing (MLM) Asp.net [modified] PinPopular
kirankkk200913-Oct-09 19:31
kirankkk200913-Oct-09 19:31 
QuestionWhy Next button of Wizard control is disabled always? Pin
meeram39513-Oct-09 19:17
meeram39513-Oct-09 19:17 
Questiondropdownlist customization Pin
harshitha200613-Oct-09 19:14
harshitha200613-Oct-09 19:14 
AnswerRe: dropdownlist customization Pin
nagendrathecoder13-Oct-09 19:24
nagendrathecoder13-Oct-09 19:24 
AnswerRe: dropdownlist customization Pin
sashidhar13-Oct-09 19:42
sashidhar13-Oct-09 19:42 
AnswerRe: dropdownlist customization Pin
ToddHileHoffer14-Oct-09 4:32
ToddHileHoffer14-Oct-09 4:32 
QuestionPopulate dropdown list with sql values Pin
asphaltninja13-Oct-09 18:43
asphaltninja13-Oct-09 18:43 
AnswerRe: Populate dropdown list with sql values Pin
nagendrathecoder13-Oct-09 19:12
nagendrathecoder13-Oct-09 19:12 
Questionhow to set the session timeout infinite in asp.net?? Pin
santu32113-Oct-09 18:30
santu32113-Oct-09 18:30 
AnswerRe: how to set the session timeout infinite in asp.net?? Pin
Abhijit Jana13-Oct-09 20:59
professionalAbhijit Jana13-Oct-09 20:59 
QuestionFunny characters when exporting data to excel Pin
Member 270789013-Oct-09 17:49
Member 270789013-Oct-09 17:49 
AnswerRe: Funny characters when exporting data to excel Pin
sashidhar13-Oct-09 18:23
sashidhar13-Oct-09 18:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.