Click here to Skip to main content
11,484,402 members (65,882 online)
Click here to Skip to main content
Add your own
alternative version

Simple Upload File to Rapidshare Account Method using C#

, 2 Apr 2009 GPL3 55.9K 796 32
By using this C# (.NET 2.0) method, you can easily upload your files to account
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QUploadToRapidshare
    public partial class Form1 : Form
        public Form1()

        private string FilePath;
        private void button1_Click(object sender, EventArgs e)


        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
            FilePath = openFileDialog1.FileName;
            textBox1.Text = FilePath;

        private void button2_Click(object sender, EventArgs e)
            if (textBox1.Text == "") openFileDialog1.ShowDialog();
            button2.Enabled = false;
            button2.Text = "Please Wait...";

        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
            QRapidshare QRapid = new QRapidshare();
            int type = 0;//Free User
            if (radioButton1.Checked)
                type = 1;//Premium User
            else if (radioButton2.Checked)
                type = 2;//Collector User

            string result = QRapid.QUploadToRapidshare(FilePath, textBox2.Text, textBox3.Text, type);
            if (result.StartsWith("<!")) result = "Login failed!";
            e.Result = result;

        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
            richTextBox1.Text = e.Result.ToString();
            button2.Enabled = true;
            button2.Text = "Upload";

        private void textBox1_DoubleClick(object sender, EventArgs e)


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


About the Author

Ghasem Heyrani Nobari
Software Developer (Senior)
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
Ghasem - Heyrani-Nobari

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 2 Apr 2009
Article Copyright 2009 by Ghasem Heyrani Nobari
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid