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
U

Udayaraju

@Udayaraju
About
Posts
26
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Error:A Generic Error occurred in GDI+
    U Udayaraju

    Hi abishek, Thanq for your Answer.. I have checked all the Permissions IIS-DefaultWebSite-MyProj-Rightclick-Properties. Tab Virtual Directory and I have checked READ and WRITE Permissions..??? Still it doesnt solve..

    ASP.NET graphics winforms sysadmin help

  • Error:A Generic Error occurred in GDI+
    U Udayaraju

    Permissions?? in which Way.. I have tried giving all READ and WRITE permissions in Virtual Directory but it doesn't solve any problem

    ASP.NET graphics winforms sysadmin help

  • Error:A Generic Error occurred in GDI+
    U Udayaraju

    Hi Dear, Here I am trying to upload a photo. protected void LoadImage() { string UserName = Session["UserName"].ToString(); byte[] Data = Profile.GetImageData(UserName); //Stmt Correct where profile is class if (Data != null) { MemoryStream stream = new MemoryStream(Data); Bitmap bitmap = null; bitmap = new Bitmap(stream); bitmap.Save(Server.MapPath(@"~\UserPhoto.bmp"), system.Drawing.Imaging.ImageFormat.Bmp); //Error:A Generic Error occurred in GDI+ bitmap.Dispose(); imgPhoto.ImageUrl = @"~\UserPhoto.bmp"; } } I have created virtual directory and trying to open it directly from browser

    ASP.NET graphics winforms sysadmin help

  • Error: A Generic Error occured in GDI+
    U Udayaraju

    Hi Dear, Here I am trying to upload a photo.

    protected void LoadImage() {
    string UserName = Session["UserName"].ToString();

            byte\[\] Data = Profile.GetImageData(UserName); //Stmt Correct where profile is class
           
            if (Data != null)
            {
                MemoryStream stream = new MemoryStream(Data);
    
                Bitmap bitmap = null;
                bitmap = new Bitmap(stream);
    
                bitmap.Save(Server.MapPath(@"~\\UserPhoto.bmp"), system.Drawing.Imaging.ImageFormat.Bmp); 
                //Error:A Generic   Error occurred in GDI+            
                bitmap.Dispose();
                imgPhoto.ImageUrl = @"~\\UserPhoto.bmp";            }     }
    

    I have created virtual directory and trying to open it directly from browser

    C# graphics winforms sysadmin help

  • Crystal Report in Asp.net
    U Udayaraju

    I am trying to Implement in Asp.net itself. I tried in these way.. Is there any better approach I have specified the error Preview.crystalRptViewer.ReportSource = Info; //Error: Object reference is not set to an instance of an object

    ASP.NET csharp asp-net database help

  • Crystal Report in Asp.net
    U Udayaraju

    Hi Dudes, Plz Solve these I am trying to implement a sample report in asp.net using crystal reports10.0. But i get an error of Object reference not set to an instance of an object Here's my code

    public void btn_Click(object sender, EventArgs e)
    {
    frmPreview Preview = new frmPreview();
    rptInformation Info = null;

            TableLogOnInfo logOnInfo = DBManager.getCrystalLogInfo(); //CorrectStatment
            Info = new rptInformation();
    
            Info.Database.Tables\[0\].ApplyLogOnInfo(logOnInfo); //Correct
    
            formulaFieldDefs = Info.DataDefinition.FormulaFields;
    
            formulaFieldDef = formulaFieldDefs\["CompanyName"\];
            formulaFieldDef.Text = "'" + Global.CompanyName + "'";
    
            Preview.crystalRptViewer.ReportSource = Info; //Error
             
        }
    

    Here I placed CrystalReportViewer in frmPreview

    ASP.NET csharp asp-net database help

  • Radiobuttonlist+AJAX Modal POPup Control
    U Udayaraju

    I have tried a lot..but unable to find the solution.. I have removed okcontrolId property too..help me

    ASP.NET database sysadmin

  • Radiobuttonlist+AJAX Modal POPup Control
    U Udayaraju

    I am opening an panel when i click newuser linkbuttton. Panel consists of 4 diff. radiobuttons wen i select an radio button option..it should navigate to new page <asp:LinkButton ID="linkNewUser" runat="server" style="z-index: 1; left: 42px; top: 170px; position: absolute; height: 21px; width: 76px">NewUser</asp:LinkButton> <asp:Panel ID="panelSelection" runat="server" CssClass="modalPopup" style="display: none" > <asp:RadioButtonList ID="RadioButtonList1" runat="server" > <asp:ListItem Value="0">Patient</asp:ListItem> <asp:ListItem Value="1">Doctor</asp:ListItem> <asp:ListItem Value="2">Pharmacy</asp:ListItem> <asp:ListItem Value="3">Lab</asp:ListItem> </asp:RadioButtonList><br /> <p style="text-align: center;"> <asp:Button ID="OkButton" runat="server" Text="OK" OnClick="OkButton_Click" /> <asp:Button ID="CancelButton" runat="server" Text="Cancel"/> </p> </asp:Panel> <ajaxToolKit:ModalPopupExtender ID="linkNewUser_ModalPopupExtender" runat="server" TargetControlID="linkNewUser" PopupControlID="panelSelection" BackgroundCssClass="modalBackground" OkControlID="OkButton" CancelControlID="CancelButton" DropShadow="true"> </ajaxToolKit:ModalPopupExtender> protected void OkButton_Click(object sender, EventArgs e) { if (RadioButtonList1.SelectedItem.Text=="Patient") { Response.Redirect("~/PatientRegDetails.aspx"); } else if (RadioButtonList1.SelectedValue=="1") { //this has to be closed } } Here OKButton_Click event is not fired.

    ASP.NET database sysadmin

  • TreeView-Error
    U Udayaraju

    Recursive methods?? Please help me out with an example or an article..I have never worked on it??

    C# help data-structures tutorial question

  • TreeView-Error
    U Udayaraju

    Here I am trying to fill the tree view category and subcategory wise..see the below |Benson and Hedges |Kings Gold Falke Beverages | |-Beers | |-Bell Lager 500 ML | |-CLUB PILSENER 500 ML | |-Juices | |-Apple Juice | |-Chikooo Juice |-Food | |-MeatProducts | |-GOAT MEAT | |-Fruits | |-APPLE GREEN | |-LOCAL ORANGES |-VegeTable | | |-BEETROOT | |-TOMATO FRESH I have tried the following code..but I am able to fill only one product under one sub category. Please help me out how to??initialize and fill the data into tree view

    foreach (DataRow row in table.Rows)
    {
    MainNode = new TreeNode(row.ItemArray[0].ToString());
    MainNode.Name = row.ItemArray[0].ToString();
    if (MainNode.Text == "")
    {
    //Stmts
    }

                    else
                    {
                        ChildNode = new TreeNode(row.ItemArray\[1\].ToString());
                        ChildNode.Name = row.ItemArray\[1\].ToString();
                        if (ChildNode.Text == "")
                        {
                            ChildNode = new TreeNode(row.ItemArray\[3\].ToString());
                            ChildNode.Name = row.ItemArray\[3\].ToString();
                            ChildNode.Tag = row.ItemArray\[2\].ToString();
                            if (!MainNode.Nodes.ContainsKey(ChildNode.Name))
                            {
                                MainNode.Nodes.Add(ChildNode);
                            } }
                        else
                        {
                            SubNode = new TreeNode(row.ItemArray\[3\].ToString());
                            SubNode.Name = row.ItemArray\[3\].ToString();
                            SubNode.Tag = row.ItemArray\[2\].ToString();
                            if (!ChildNode.Nodes.ContainsKey(SubNode.Name))
                            {
                                ChildNode.Nodes.Add(SubNode);
                            } }
                        if (!MainNode.Nodes.ContainsKey(ChildNode.Name))
                        {
                            MainNode.Nodes.Add(ChildNode);
                        }
                        else
                        {
    

    //Here I am unable to understand how to fill child nodes into mainnode
    //The below code is wrong
    for (int i = 0; i <= MainNode.Nodes.Count; i++)
    {

    C# help data-structures tutorial question

  • TreeView
    U Udayaraju

    Here I am trying to do like these Beverages | |-Beers | |-Bell Lager 500 ML | |-CLUB PILSENER 500 ML | |-Juices | |-Apple Juice | |-Chikooo Juice |-Food | |-MeatProducts | |-GOAT MEAT | |-Fruits | |-APPLE GREEN | |-LOCAL ORANGES |-VegeTable | | |-BEETROOT | |-TOMATO FRESH

    C# data-structures

  • TreeView
    U Udayaraju

    If u see the above code I have problem here to fill the remaining Data. Please trace these at

    else
    {
    SubNode = new TreeNode(row.ItemArray[3].ToString));
    SubNode.Name = row.ItemArray[3].ToString);
    SubNode.Tag = row.ItemArray[2].ToString);
    if (!ChildNode.Nodes.ContainsKeySubNode.Name))
    {
    ChildNode.Nodes.Add(SubNode);
    } }
    if (!MainNode.Nodes.ContainsKey(ChildNode.Name))
    {
    MainNode.Nodes.Add(ChildNode);
    }
    else
    {
    //Here I am unable to understand how to fill child nodes into mainnode
    //The below code is wrong
    for (int i = 0; i <=MainNode.Nodes.Count;i++)
    {
    MainNode.Nodes.Add(ChildNode);
    }
    }

    C# data-structures

  • On button click-context menu strip
    U Udayaraju

    Thanq Dave Itz working

    C# graphics

  • TreeView
    U Udayaraju

    Thanq..I wil Try

    C# data-structures

  • TreeView
    U Udayaraju

    Did Any body got any idea

    C# data-structures

  • TreeView
    U Udayaraju

    This is My data CategName subCateName Id Products NULL NULL 6 Prod3 NULL NULL 9 SalesProd7 Beverages Beers 15 Bell Lager 500 ML Beverages Beers 16 CLUB PILSENER 500 ML Beverages Juices 24 Apple Juice Beverages Juices 25 Chikooo Juice Beverages SoftDrinks 26 Coke Beverages SoftDrinks 27 Pepsi Beverages Wines 28 RED WINE Beverages Wines 29 White Wine Food MeatProducts36 GOAT MEAT Food Fruits 18 APPLE GREEN Food Fruits 19 LOCAL ORANGES Others OtherItems 30 BENSON & HEDGES LIGHT VegeTable NULL 20 BEETROOT VegeTable NULL 21 TOMATO FRESH I got the above data into Datatable 'table' and I am trying to insert into tree view as Categories-subcategories-Products. I have tried the following and my output in such a way i get only one product for each categorie and sub categorie.

    if (table != null)
    {
    foreach (DataRow row in table.Rows)
    {
    MainNode = new TreeNode(row.ItemArray[0].ToString());
    MainNode.Name = row.ItemArray[0].ToString();
    if (MainNode.Text == "")
    {
    MainNode = new TreeNode(row.ItemArray[1].ToString());
    MainNode.Name = row.ItemArray[1].ToString();
    if (MainNode.Text == "")
    {
    MainNode = new TreeNode(row.ItemArray[3].ToString());
    MainNode.Name = row.ItemArray[3].ToString();
    MainNode.Tag = row.ItemArray[2].ToString();
    if (!RootNode.Nodes.ContainsKey(MainNode.Name))
    {
    RootNode.Nodes.Add(MainNode);
    } }
    else
    {
    ChildNode = new TreeNode(row.ItemArray[3].ToString());
    ChildNode.Name = row.ItemArray[3].ToString();
    ChildNode.Tag = row.ItemArray[2].ToString();
    if (!MainNode.Nodes.ContainsKey(ChildNode.Name))
    {
    MainNode.Nodes.Add(ChildNode);
    }
    if (!RootNode.Nodes.ContainsKey(MainNode.Name))
    {
    RootNode.Nodes.Add(MainNode);
    } } }
    else
    {

    C# data-structures

  • On button click-context menu strip
    U Udayaraju

    I have 30 buttons and I am trying to implement context menu on each button click by using following method.

    void OnButtonClick(object sender, EventArgs e)
        {
            Button btn = (Button)sender;
            btn.ContextMenuStrip.Show(btn, new System.Drawing.Point(0, btn.Height));
        }
    

    I have 2 context menu strip items, Add text Label and Add colour

    private void addTextLabelToolStripMenuItem_Click(object sender, EventArgs e)
    {
    foreach (Control item in panel2.Controls)
    {
    Button btn = (Button)item;
    if (string.IsNullOrEmpty(btn.Text.Trim()))
    {
    frmAddText form = new frmAddText();
    form.ShowDialog();

                    if (frmAddText.IsTextMod)
                    {
                        return;
                    }
                    btn.Text = form.TextInfo;
                    btn.Tag = 0;
                }				} }
    

    Wen i try to do this it is implementing on last button itself. Here Ia m returning Here foreach is not acceptable.

    private void addColourToolStripMenuItem_Click(object sender, EventArgs e)
    {
    colorDialog1.ShowDialog();
    DialogResult dResult = colorDialog1.ShowDialog();
    foreach (Control item in panel2.Controls)
    {
    Button btn = (Button)item;
    string strBtnName = btn.Name;
    if (string.Equals(btn.Name, strBtnName, StringComparison.OrdinalIgnoreCase))
    {
    if (dResult == DialogResult.OK)
    btn.BackColor = colorDialog1.Color;
    } } }

    It is applying color to all buttos. But it should apply for only specific clicked button. Here foreach is not acceptable.

    C# graphics

  • DateTimepIcker-Error
    U Udayaraju

    dtpFromDate & dtpTodate are DateTimepickers and a TextBox txtNoofDays

    private void dtpFromDate_ValueChanged(object sender, eventArgs e)
    {
    double value=Convert.ToDouble(txtNoOfdays.Text);
    dtpToDate.Value=dtpFromDate.Value.AddDays(value);
    }

    Here I got the error at--> //double value ---- Input string was not in correct format How to resolve It.

    C# help tutorial

  • Listview Sub item Edit
    U Udayaraju

    Hi, Here I am trying to edit value in lstListView.SelectedItems[0].SubItems[3] column. The textbox I have placed is not displayed at that coulmn position. I have done with all the possibilites but unable to place the textbox in required Location. The position of textbox is not displayed in required column.

    C# graphics debugging help

  • Listview Sub item Edit
    U Udayaraju

    Hi, Can anyone trace out where is the error lstListView.DoubleClick += new EventHandler(this.lstEditDoubleClick); txtSubItem.KeyPress += new KeyPressEventHandler(this.txtEditOver); lstListView.MouseDown += new MouseEventHandler(this.lstEditMouseDown); public void lstEditMouseDown(object sender, MouseEventArgs e) { ListViewItem item = lstListView.GetItemAt(e.X, e.Y); X = e.X; Y = e.Y; } private void lstEditDoubleClick(object sender, EventArgs e) { int nStart = X; int spos = 0; int epos = lstListView.Columns[0].Width; for (int i = 0; i < lstListView.Columns.Count; i++) { spos = epos + X; epos += lstListView.Columns[3].Width; } subItemText = lstListView.SelectedItems[0].SubItems[3].Text; Rectangle r = new Rectangle(spos, lstListView.SelectedItems[0].SubItems[3].Bounds.Y, epos, lstListView.SelectedItems[0].SubItems[3].Bounds.Bottom); txtSubItem.Size = new System.Drawing.Size(epos - spos, lstListView.SelectedItems[0].SubItems[3].Bounds.Bottom - lstListView.SelectedItems[0].SubItems[3].Bounds.Top); txtSubItem.Location = new System.Drawing.Point(spos, lstListView.SelectedItems[0].SubItems[3].Bounds.Y); txtSubItem.Show(); txtSubItem.Text = subItemText; } private void txtEditOver(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { lstListView.SelectedItems[0].SubItems[3].Text = txtSubItem.Text; txtSubItem.Hide(); } if (e.KeyChar == 27) txtSubItem.Hide(); }

    C# graphics debugging help
  • Login

  • Don't have an account? Register

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