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
M

minniemooo

@minniemooo
About
Posts
52
Topics
45
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Gridview to Database
    M minniemooo

    I have a gridView on my page. How do I insert the contents of the gridView to sql database? My database table is empty at the moment.

    ASP.NET database question

  • SmartNavigation
    M minniemooo

    Please help. I have Page.SmartNavigation = true; in my page load but it does not work' My browser does not maintain its last position after the page refreshes.

    ASP.NET help

  • SmartNavigation
    M minniemooo

    Please help. I have Page.SmartNavigation = true; in my page load but it does not work' My browser does not maintain its last position after the page refreshes.

    C# help

  • Zip files and send to sever
    M minniemooo

    My code below gets files from a list box and Zip those files into one Zip file. My propble is: This works perfectly when i log on to the server and do this operation on the sever itself.(it is an Intranet). But when i do this on my local machine which is on the same network as the server, it only creates the Zip file but its empty. Can someone please help. //Zip txtsave.Text = "c:\\TempUpload"; System.IO.Directory.CreateDirectory(txtsave.Text); if(ListBox1.Items.Count < 1) { listerror.Text = "Please add Files to the list Box and Press Confirm"; return; } if (txtsave.Text == string.Empty) { listerror.Text = "save folder not selected"; return; } string[] sTemp = txtsave.Text.Split('\\'); string sZipFileName = sTemp[sTemp.Length - 1].ToString(); FileInfo fi = new FileInfo(txtsave.Text + "\\" + sZipFileName + ".zip"); if(!System.IO.Directory.Exists(txtsave.Text + "\\TempZipFile\\")) { System.IO.Directory.CreateDirectory(txtsave.Text + "\\TempZipFile\\" + ".zip"); } string sTargetFolderPath = (txtsave.Text + "\\TempZipFile\\"); for (int i =0; i< ListBox1.Items.Count;i++) { string filepath = ListBox1.Items[i].ToString(); FileInfo fi2 = new FileInfo(filepath); if(fi2.Exists) { try { fi2.CopyTo(sTargetFolderPath + fi2.Name, true); } catch { System.IO.Directory.Delete(sTargetFolderPath); listerror.Text = "Error on Files"; return; } } } try { string[] filenames = Directory.GetFiles(sTargetFolderPath); using (ZipOutputStream s = new ZipOutputStream(File.Create(txtsave.Text + "\\" + sZipFileName + ".zip"))) { s.SetLevel(9); byte[] buffer = new byte[4096]; foreach (string file in filenames) { ZipEntry entry = new ZipEntry(Path.GetFileName(file)); entry.DateTime = DateTime.Now; s.PutNextEntry(entry); using (FileStream fs = File.OpenRead(file)) { int sourceByte; do { sourceByte = fs.Read(buffer, 0, buffer.Length); s.Write(buffer, 0, sourceByte); } while(sourceByte > 0); } } s.Finish(); s.Close(); } System.IO.Directory.Delete(txtsave.Text + "\\TempZipFile\\", true); } catch(Exception ex) { listerror.Text = ex.Message.ToString(); }

    C# sysadmin help

  • Add Blank Line to dropdownlist
    M minniemooo

    I am populating my Dropdownlist using dataset DataTable t_table = new DataTable(); SqlDataAdapter adapt; SqlCommand cmd = new SqlCommand("SELECT distinct ID from TBL1",conn); adapt = new SqlDataAdapter(cmd); adapt.Fill(t_table); dsProj.Tables.Add(t_table); The staement does populate as expected but I want to insert a Blank Line First. How can I do this?

    C# question

  • Changing Images every five secons
    M minniemooo

    I have a webform. I have a couple of images in my folder and i want to display them on my from changing from one image to another every five sec. How can I co this?

    C# question

  • Insert TXT data into SQL database
    M minniemooo

    I have data in txt format and want to save the data in my table in SQL database. How can I do this without using DTS?

    C# database question

  • Sending email from Webpage
    M minniemooo

    I have 3 textboxes on my webform (Sender's email,name, age). When they hit submit, an email must be sent to an email address eg. me@gmail.com with the subject and the body should be the information from the 3 textboxes. How can I do this?

    C# question com

  • Dropdownlist in a repeater
    M minniemooo

    I have a repeater with two dropdownlist in it. I created the ddl in HTML. I have fields in a SQL table. Field1 populates ddl1 and field2 populates ddl2. This is what i want to do: I want to make a selection in ddl1 and depending on what i have selected, ddl2 should be populated. Please help,

    C# html database help

  • convert string to Int
    M minniemooo

    How do I convert a string textbox to int?

    C# question

  • Error: The IListSource does not contain any data sources.
    M minniemooo

    Please help. I am getting the above error. my code: SqlConnection conn = new SqlConnection("data source=server;initial catalog=database;persist security info=False;user id=user;password=password"); conn.Open(); DataTable t_table = new DataTable(); SqlDataAdapter adapt; SqlCommand cmd = new SqlCommand("Select Project_ID From tblProjects",conn); adapt = new SqlDataAdapter(cmd); adapt.Fill(t_table);dsProjectId.Tables.Add(t_table);

    C# help database sysadmin security

  • Dropdownlist
    M minniemooo

    How do I populate my dropdownlist with data from SQL?

    C# question database

  • Error
    M minniemooo

    Error :Object reference not set to an instance of an object. Here is my code. SqlConnection conn = new SqlConnection("Data Source=servername;Database=dbCustom;Integrated Security=SSPI"); SqlCommand comm = new SqlCommand("GetProjects", conn); SqlDataAdapter adapter = new SqlDataAdapter(comm); DataSet ds = new DataSet(); adapter.Fill(ds, "Project_ID"); ProjectidList.DataSource = ds; * it says error is on this line ProjectidList.DataMember = ds.ToString();

    C# database security help

  • DropDownList
    M minniemooo

    Hi, I get the following error: 'System.Web.UI.WebControls.DropDownList' does not contain a definition for 'DatatValueField' My code : string sqlStmt = null; sqlStmt = "GetProjest";//stored proc SqlCommand cmd = new SqlCommand(); cmd.CommandText = sqlStmt; cmd.CommandType = CommandType.StoredProcedure; SqlDataReader sqlReader = cmd.ExecuteReader(); if(sqlReader.HasRows) { ProjectidList.DataSource = sqlReader; ProjectidList.DataTextField = "Project_ID"; ProjectidList.DatatValueField = "Project_ID"; ProjectidList.DataBind(); }

    C# design help

  • Zip files
    M minniemooo

    Hi there, Is it possible to zip Files using C#? eg, I populate my listbox with files from my c drive using file uploader. The I want to take all those files amd Zip them into one Zip file then save them. How can I do that?

    C# question csharp

  • ListBox
    M minniemooo

    hi, How do I add numbers in a listBox? eg. I have a list of numbers in my listbox and I want to add them and place the result in a textBox.

    C# question

  • Input String
    M minniemooo

    Hi, I have the following code private void checkBox2_CheckedChanged(object sender, System.EventArgs e) { if(checktables.Checked == true) { int tables = Convert.ToInt32(txtqtables.Text); listBox1.Items.Add(35 * tables); } } If I click on my CheckBox, I want the number in the txtqtables.text to be multiplied by 35 and the results to be place in a listbox. I am getting an error on "int tables = Convert.ToInt32(txtqtables.Text);" Input string is not in a correct format. Please help.

    C# help

  • File Uploader
    M minniemooo

    I need to get files from my c drive one-by-one using file uploader and put themin a list box then save the files to a server. can someone help please.

    C# sysadmin help

  • Uploading two files
    M minniemooo

    Hi, I have the following code to upload one file. private void cmdUpload_Click(object sender, System.EventArgs e) { if (( File1.PostedFile != null) && (File1.PostedFile.ContentLength > 0)) { //determine file name string sFileName = System.IO.Path.GetFileName(File1.PostedFile.FileName); try { if (File1.PostedFile.ContentLength <= lMaxFileSize) { //Save File on disk File1.PostedFile.SaveAs(sFileDir + sFileName); lblMessage.Visible=true; lblMessage.Text="File: " + sFileDir + sFileName + " Uploaded Successfully"; } else //reject file { lblMessage.Visible=true; lblMessage.Text="File Size if Over the Limit of " + lMaxFileSize ; } } catch(Exception)//in case of an error { lblMessage.Visible = true; lblMessage.Text="An Error Occured. Please Try Again!"; DeleteFile(sFileDir + sFileName); } } } I want to upload two files intead of one. Please help.

    C# help

  • what is wrong here? Please help
    M minniemooo

    Hi, I am getting the following error: Line 1: Incorrect syntax near ','. conn.Execute = "UPDATE JOB SET " &_ "TITLE='" & cleanText(sTitle) & "', " &_ "CATEGORY=" & cleanText(sCategory) & ", " &_ "DEPARTMENT='" & cleanText(sDepartment) & "', " &_ "DESCRIPTION='" & cleanText(sDescription) & "', " &_ "RESPONSIBILITIES='" & cleanText(sResponsibility) & "', " &_ "REQ='" & cleanText(sRequirements) & "', " &_ "COMPENSATION='" & cleanText(sCompensation) & "', " &_ "CONTACT_PERSON='" & cleanText(sContactPerson) & "', " &_ "CLOSINGDATE='" & cleanText(sClosingDate) & "', " &_ "CONTACT_EMAIL='" & cleanText(sContactEmail) & "', " &_ "StatusId='" & 0 & "' WHERE ID=" & jobID

    ASP.NET help question announcement career
  • Login

  • Don't have an account? Register

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