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
B

Ballita

@Ballita
About
Posts
59
Topics
37
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Export to excel /xlsx file
    B Ballita

    Hi, I need to export file in xlsx format. My code is bellow: string Path = strFullTo + "Balancing_" + String.Format("{0:MMddyy}", DateTime.Now) + ".xlsx"; StringWriter stringWriter = new StringWriter(); HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWriter); GridView DataGrd = new GridView(); System.IO.StreamWriter vw = new System.IO.StreamWriter(Path, true,System.Text.Encoding.Default); stringWriter.ToString().Normalize(); string style = @" .textmode { mso-number-format:\@; } "; vw.Write(style); vw.Write(stringWriter.ToString()); vw.Flush(); vw.Close(); But my problem is when I am trying to open the xlsx file it is saying "File format or extension is not valid". I need to keep the data in xlsx file. Please help.

    Thanks & Regards Mishra

    ASP.NET help

  • Absolute Timeout in windows Authentication
    B Ballita

    Hi, I have a web application which uses windows authentication and I need to set a session time out for it after 8hours even if it is not idle. I mean I need an absolute timeout after 8hours. Any help is appreciated.

    Thanks & Regards Mishra

    ASP.NET security help

  • Making a colored string
    B Ballita

    Hi, I have a string and I want to make my string 'blue' through my code. Can anyone tell me how to do that.

    Thanks & Regards Mishra

    Visual Basic tutorial

  • OnBeforeKeyPress
    B Ballita

    Is there anything in vb.net similar to OnBeforeKeyPress.

    Thanks & Regards Mishra

    Visual Basic csharp

  • Event Problem
    B Ballita

    Hi, In my project, Code is written for an event in the application level to display a dialog box after a fixed interval of time. I don't have that code I have only the reference for that code. So when that event is getting fired i want to handle that event not to display that dialog box. How can i do that.

    Thanks & Regards Mishra

    Visual Basic help question

  • Finding a certain character
    B Ballita

    Hi all, I have different characters in a string, My string may contain CHAR(10) or CHAR(13) + CHAR(10). If my string contain only CHAR(10) then I want to replace it with CHAR(13) + CHAR(10). And if my string contain CHAR(13) + CHAR(10) then I don't want to replace it. Can any body give me a solution to this.

    Thanks & Regards Mishra

    Database

  • Cannot insert duplicate key row in object
    B Ballita

    In my current application I am getting an error "Cannot insert duplicate key row in object with unique index .\r\n51062\r\nThe statement has been terminated." while trying to run the command sqlCommand.ExecuteNonQuery(); Please advice me if anyone has any idea on this.

    Thanks & Regards Mishra

    Database database help

  • Cannot insert duplicate key row in object
    B Ballita

    In my current application I am getting an error "Cannot insert duplicate key row in object with unique index .\r\n51062\r\nThe statement has been terminated." while trying to run the command sqlCommand.ExecuteNonQuery(); Please advice me if anyone has any idea on this.

    Thanks & Regards Mishra

    C# database help

  • Context Menu problem
    B Ballita

    Hi Can anybody tell me how to set a default length for a context menu or for context menu item.

    Thanks & Regards Mishra

    C# help tutorial

  • Sql server Reporting
    B Ballita

    Anybody who worked on sql server reporting, can you please tell me how to improve performance of any report.

    Thanks & Regards Mishra

    Database database sql-server sysadmin performance tutorial

  • multiple selection listbox
    B Ballita

    Could you please describe how can i use that.

    Thanks & Regards Mishra

    C# help

  • multiple selection listbox
    B Ballita

    Hi, I have the following problem. On a page I have a multiple selection listbox. It contains a lot of items. When items near the bottom are selected, and I do a button click, the control jumps to the top. If there are a lot of items, this can get very annoying, always having to scroll down to the selected items (if I want to change them, or something). Is there any solution so that after button click also the mouse position remain unchanged.

    Thanks & Regards Mishra

    C# help

  • I don't want to parse my string
    B Ballita

    Hi, My problem has solved.

    Thanks & Regards Mishra

    ASP.NET csharp xml question

  • I don't want to parse my string
    B Ballita

    Hi, I have a string which contains xml tags, but C# is prsing all the tags and i don't want to parse that I want it exactly as it is, How can I do that.

    Thanks & Regards Mishra

    ASP.NET csharp xml question

  • gridview Problem
    B Ballita

    Hi, I have a gridview where there is two static columns which are template columns and few dynamic columns. there is a button in that page. On clicking on that button the dynamic column are dynamically creating. Each time I am removing the old dynamic columns and recreate the new columns according to some selection criteria. But my problem is on the third time click on the button the static template columns are getting removed from the gridview.

    Thanks & Regards Mishra

    ASP.NET help

  • Clearing columns from gridview
    B Ballita

    How can I keep the index of dynamically generated column. Is there any way.

    Thanks & Regards Mishra

    ASP.NET

  • Clearing columns from gridview
    B Ballita

    Hi, I have a gridview which has few dynamic columns and few static columns. Each time of reload of the gridview I want to clear all the dynamic column only. But while using the columns.clear property of gridview it is clearing all the columns. Is there any way that I can clear only the dynamic columns.

    Thanks & Regards Mishra

    ASP.NET

  • Dynamically adding value in drop down list of a Gridview
    B Ballita

    Hi, I am adding values to the ddl in RowDataBound event using the following code. if (e.Row.RowType == DataControlRowType.DataRow) { DropDownList ddlval = new DropDownList(); ddlval = (DropDownList)e.Row.FindControl("ddlvalidation"); if (lblcheck.Text == "Suspect") { ddlval.Items.Add("Error"); ddlval.Items.Add("No Error"); } else if (lblcheck.Text == "Fatal") { ddlval.Items.Add("Not Fixed"); ddlval.Items.Add("Fixed"); } & In the button save I am trying to fetch the selected values using the following code, but I am getting the error "Object reference not set to an instance of an object." foreach (GridViewRow rec in this.gvsqldesc.Rows) { //Response.Write(rec.Cells[0].Text); DropDownList ddlval = new DropDownList(); ddlval = (DropDownList)rec.FindControl("ddlvalidation"); string str = null; str = ddlval.SelectedItem.Text; }

    Thanks & Regards Mishra

    ASP.NET question

  • Dynamically adding value in drop down list of a Gridview
    B Ballita

    Hi, I have a gridview which has dropdown list in template column and i am adding value dynamically to that drop down list.Now I want to save all the values which I have selected in the dropdown list. But while clicking on save button in that page it is not retaining the selected values of the ddl. How can I solve this?

    Thanks & Regards Mishra

    ASP.NET question

  • Dropdown in Gridview
    B Ballita

    Hey, I have tried this one also. It is not returning null but it is not fetching the values.

    Thanks & Regards Mishra

    ASP.NET 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