ss125 18 Posting Whiz in Training

@mattster, Can you temme the cost for studies out there?

ss125 18 Posting Whiz in Training

Yes its the Indian official page of Google...

ss125 18 Posting Whiz in Training

Well this is my excel upload file...

if (FileUpload1.HasFile)
                {
                    string fileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
                    string fileExtension = Path.GetExtension(FileUpload1.PostedFile.FileName);
                    string fileLocation = Server.MapPath("~/App_Data/" + fileName);
                    FileUpload1.SaveAs(fileLocation);
                    //Check whether file extension is xls or xslx
                    if (fileExtension == ".xls")
                    {
                        connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileLocation + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
                    }
                    else if (fileExtension == ".xlsx")
                    {
                        connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileLocation + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
                    }

                    //Create OleDB Connection and OleDb Command
                    OleDbConnection con = new OleDbConnection(connectionString);
                    OleDbCommand cmd = new OleDbCommand();
                    cmd.CommandType = System.Data.CommandType.Text;
                    cmd.Connection = con;
                    OleDbDataAdapter dAdapter = new OleDbDataAdapter(cmd);
                    DataTable dtExcelRecords = new DataTable();
                    con.Open();
                    DataTable dtExcelSheetName = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
                    string getExcelSheetName = dtExcelSheetName.Rows[0]["Table_Name"].ToString();
                    cmd.CommandText = "SELECT * FROM [" + getExcelSheetName + "]";
                    dAdapter.SelectCommand = cmd;
                    dAdapter.Fill(dtExcelRecords);
                    con.Close();
                    GridView1.DataSource = dtExcelRecords;
                    GridView1 .DataBind();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("The error is"+ex);
            }

To be frank, I used validation at front end to write in the excel file. So there is no need for checking the empty values of data. But based on your problem you need to check the excel file itself(since it is unknown to me.)

So, I can suggest a way to populate the dataset manually.

The following code shows how to populate the record manually

DataTable workTable = new DataTable("Customers");

DataColumn workCol = workTable.Columns.Add("CustID", typeof(Int32));
workCol.AllowDBNull = false;
workCol.Unique = true;

workTable.Columns.Add("CustLName", typeof(String));
workTable.Columns.Add("CustFName", typeof(String));
workTable.Columns.Add("Purchases", typeof(Double));

after that you have to declare a loop like

while (csv.ReadNextRecord())
        {
            for (int i = 0; i < …
saguni commented: awesome effort!!! Keep it up!!! +0
ss125 18 Posting Whiz in Training

I suggest you to use loops and arrays that is regarding the code resuability. I think @saguni also said that only i hope.
I didnt tried that in vb.net. I tried the same in c#.

And, regarding the code you said

but when i import excel data table without blanks and duplicates it doesn't run

Can you please post that too. because I have to confirm on which logic you are checking the empty records.

Sorry for the Late response
ss125 18 Posting Whiz in Training

what @CimmerianX said is right. Please do that.

ss125 18 Posting Whiz in Training

Fine. Post the result in this forum..

ss125 18 Posting Whiz in Training

I also tried that vibosoft... Its like hell and its purely a waste of money... I suggest you to try recuva itself...

As @Rik from RCE said, the crash of recuva is like a miracle. It seems like recuva is trying to restore a viral file where as your antivirus program must be blocking it.

So, try it in 2 ways.

1) Turn off your antivirus protection and try recovering files. (Extremely harmful)
2) Try to recover the files little by little.i.e, 10 files recovery at a time. Like that...

Hope this helps you...

Have a happie coding...:D

ss125 18 Posting Whiz in Training

@Ketsuekiame,

yup...I forget to notice that...:D

ss125 18 Posting Whiz in Training

And I also forget to mention that to perform a math operation the value must be converted to integer(since it is a quntity).

Hope this helps you...

Have a happy coding...:D

ss125 18 Posting Whiz in Training

It may be wrong but I think the problem is with your updater statement.

cmd = new OleDbCommand("UPDATE [Seranne] SET [Quantity] ='" + newVal + "' WHERE [Code] IN ('");

There is a unended round bracket in your query.

Correct me if I am wrong Ketsuekiame and ddanbe...

Ketsuekiame commented: Well spotted +9
ss125 18 Posting Whiz in Training

it has worked once in between

If the above line is true, I can say that there are two possibilities, One is faulty cable which may be faulted due to lightening.

The other thing is you must check whether there is any loose connectivity of cable. I once faced the same situation but that problem was resolved due to improper cable connection to my modem.

ss125 18 Posting Whiz in Training

@CimmerianX,
Since I must limit my bandwidth in office. I cant able to download all the contents of the mail. So your method fails here.

@Reverend Jim,
Hope this should do what I want...

Thanks to you both for a fast reply....

ss125 18 Posting Whiz in Training

The there is a speaker fault as I already said.

ss125 18 Posting Whiz in Training

@Stuugie,
FYI:
There are several areas where we nweed to import or export inside an application. Even I had went accros the problem. Recent times, some clients of our company also asks application with features like these.

@gayzlein,
It can be done my friend. I have done that using c#. You can also do that in vb.net. Here are some link that can help you...

Link1
Click Here

Hope this helps you.

Next time while posting your problem, provide us with the codes you tried. So that we can help you in a easy way.

Have a happy coding...:-D

Stuugie commented: Thanks for the FYI. +4
saguni commented: Yess... This is a trouble in the ass to the developer,but it is a gift to the end user to upload a single file and update the database within seconds... Well said friend... +0
ss125 18 Posting Whiz in Training

I have recently configured my online outlook account with my gmail id. All my configuration were done. But after configuration outlook is downloading all my previous mails. I want to stop the unnecesary download of old mails. I want to configure it such that it should only download/sync today's mail only.

Is there is a way to accomplish it?

Thanks in advance...

ss125 18 Posting Whiz in Training

There are several reasons for this issue.

Some may be

1) network card disabled.
2) network card malfunctioning
3) OS problems such as improper closing of internet using programs,etc.,

So, Kindly specify when this problem occured. like any new software installation/Uninstallation.

ss125 18 Posting Whiz in Training

The problem is with your code at the line 49

decimal newVal = textBoxQuantityContainer[index].Value - Convert.ToDecimal(dReader["Quantity"].ToString());

In order to do a math function(minus) both the data must be numerical. But while retrieving data from database it will be in string format. so your code failed.

Solution:
you have to convert the data to integer and then perform math operations.

int qty1=Convert.ToInt32(dReader["Quantity"].ToString());
int qty2=Convert.ToInt32(textBoxQuantityContainer[index].Value.ToString());

int final_qty=qt1-qy2;

Now store the final_qty in the database...

Hope this helps you...

Have a happie coding...:D

ss125 18 Posting Whiz in Training

As @C#Japp said, the problem is with the line

cboColumnNames[i].SelectedIndexChanged += new EventHandler(ComboBoxSelectedIndexChanged);

You are using a constant value to loop.

for(int i=0;i<20;i++)

So, you have to write the code for 20 comboboxes.

and to avoid the changes of other combos

you have to get the name or id of the combobox and write the function to do appropriate operation i.e only the particular combo value must be changed...

Hope this helps u...

Have a happy coding...:D

ss125 18 Posting Whiz in Training

@JorgeM,
Thank you. The links are helpful. I am working on it.

ss125 18 Posting Whiz in Training

Once i too was in a same confusion about the java and C#. Because I am specialized in Java whereas I got the Job in c# platform. I planned to stay there at the company till training period. But now over a month is passed and I am loving it. You know, to write a keylogger application ,in java it takes nearly and minimum 500 lines of code and debugging is also little bit fuzzy. But the whole keylogger application in c# took only 50 lines and the prolem of debugging is also reduced nwhen compared to java.

So dont hesitate, If you wish to be in java, you can. If you need an easy change switch to c#.

FYI, c# also has an advancement called F#...

Try googling it...

Hope this helps you...

Have a happie Coding...:D

rubberman commented: keyloggers? Work for the NSA or some other criminal organization? -3
happygeek commented: +11
ss125 18 Posting Whiz in Training

I think this may fix the issue

open the [formname].designer.cs

and check whether there is a code like below

protected global::System.Web.UI.WebControls.Button clicksave;

If not add the code...

Hope this helps you..

Have a happie coding...:D

ss125 18 Posting Whiz in Training

After gathering data from the above conversation the following are to be checked:

I can say that your motherboard driver may not be properly installed. It also may cause such problems.

Try to reinstall the motherboard driver and audio driver.

And kindly reply me whether the heat produced by your laptop is less or more. Because the heat may result in the fault of wire connection between the motherboard and the speakers.

test the sound with the headphone,whether you are getting the same prob.Reply this too.

If the problem exists still, then I can say only one thing. You speaker is out

ss125 18 Posting Whiz in Training

@JorgeM,

As per your suggestion I am having a doubt. Consider the following code.

  <rewriter>
    <rewrite url="~/products/books.aspx" to="~/products.aspx?category=books" />
    <rewrite url="~/products/CDs.aspx" to="~/products.aspx?category=CDs" />
    <rewrite url="~/products/DVDs.aspx" to="~/products.aspx?category=DVDs" />
  </rewriter> 

does the user gets the page "~/products/books.aspx" when the following url is typed?

~/products.aspx?category=books"

I Mean,when I type the URL in the address bar like below

www.mangabooks.com/products.aspx?category=books

Does the page

www.mangabooks.com/products/books.aspx

will be accesible?

ss125 18 Posting Whiz in Training

@ChrisHunter,

Its ok Bro...Thank you for your efforts. Someone from US can also help regarding this I hope.

ss125 18 Posting Whiz in Training

As @ChrisHunter said, there is a language latency I hope.

As per my analysis of your code, the problem is with the following statement of your code.

if (this.InvokeRequired)
{
Action act = () =>
{
this.Hide();
};

Instead of that Hide() function use the Close() function.

Because Hide() makes the form to run at background where Close() closes the form.

Hope this helps you...

Have a happy coding...:D

ss125 18 Posting Whiz in Training

You can also use the following code...

            SqlCommand cmd = new SqlCommand("select * from sps_login", con);
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds);
            con.Close();
            GridView1.DataSource = ds;
            GridView1.DataBind();

            Response.Clear();
            Response.Buffer = true;
            Response.AddHeader("content-disposition", "attachment;filename=GridViewExport.doc");
            Response.Charset = "";
            Response.ContentType = "application/vnd.ms-word ";
            StringWriter sw = new StringWriter();
            HtmlTextWriter hw = new HtmlTextWriter(sw);
            GridView1.AllowPaging = false;
            GridView1.DataBind();
            GridView1.RenderControl(hw);
            Response.Output.Write(sw.ToString());
            Response.Flush();
            Response.End();

Hope it helps you...

Have a happy coding...:-D

timmyjoshua commented: no, it's not helping i need to create microsoft word file.... +0
ss125 18 Posting Whiz in Training

There are several helps, why not? even samples are available. I suggest you to download the sample code from here

Hope this helps you...:-D

ss125 18 Posting Whiz in Training

Well as @nitin said, I remember the head of Google's Android team was also a Indian.

nitin1 commented: damn true!! this proves the intelligence level of Indian Engineers +0
ss125 18 Posting Whiz in Training

Man both are wonderful links.But £3,500 to about £18,000 thats a huge sum for us to pay. Anyway @ChrisHunter, both the links states about the colleges in UK only. What about US bro?

ss125 18 Posting Whiz in Training

@JorgeM:
Well Its a good link. But that is totally different from what i need. But anyway thankyou, As per Ketsuekiame answer, I can able to do that in a MVC architecture(Correct me if i am wrong). What are you thinking about that?

ss125 18 Posting Whiz in Training

@ChrisHunter,

Both the websites are blocked in our company's proxy. So I will go through that after reaching my place and reply you.

ss125 18 Posting Whiz in Training

@nitin1,

Ya you are right. This is the irritating fact about studying abroad.

is there any solution of this thing ? I mean any type of loan which i can pay after my MS, or any other schemes ?

Yes... I am sure that schemes are there , because my friends brother done MS in UK by loan procedure here. But the thing is we have to be sure about our future repayment, that is purely depending on the job we get... Thats y here I posted the question which includes the campus placements also.

@ChrisHunter,
I dont have any people to guide me to go for abroad. So I am out of help other than this forum. I hope you are living there in UK. If u have a free time can u ask some of your friends there about the fees structure for us? Because not only me, many of my friends and country men are hunger for knowledge but we are rejected due to Financial issues. So If u can help us, It will help many people who are hunger like me...

Thank you...

ss125 18 Posting Whiz in Training

@JorgeM,

you need to have the URL Rewrite module installed on IIS.

I am using Visual studio 2010 to develop thi application. So I think there is no necessary of IIS installation. And also I am working in a office system, which does not allow an employee to easily install products.

You probably need to tweak the URL rewrite code above because not every URL will be incoded correct? How will the user access basic pages like home, about, etc..?

I am creating an web application in which there will be flow in the application such that after this page the user will be automatically redirected to the next page as programmed. So there is no need to worry about basic access page as you said.

ss125 18 Posting Whiz in Training

Man thats really insane as you said. I am from India. So I heard that they will be adding some more too. Is that so @ChrisHunter?

ss125 18 Posting Whiz in Training

Now lets see what help can i get here... :)

ss125 18 Posting Whiz in Training

@ ChrisHunter,

Thank you bro. Can you tell a common estimation of how much will it cost in UK to have my studies there?

ss125 18 Posting Whiz in Training

@chaziz,

Aap yaha english par lik karo. ithar logo ko keval English jaantha he...

So please post in English.

ss125 18 Posting Whiz in Training

k k.. Thank you...

ss125 18 Posting Whiz in Training

@Ketsuekiame:
Are you referring to the ASP.Net forum in Daniweb?

ss125 18 Posting Whiz in Training

@Ketsuekiame:

Fine then.

I have a scenario.. Can you please tell me whether It can be done in the following scenario.

My applicaion consists of an login form,welcome form and a mid.cs file. The mid.cs file contains the encode and decode functions. I got the steps until the url is encoded. Now the doubt is about is it possible to change the URL of the page to the encoded URL?

ss125 18 Posting Whiz in Training

I was just thinking of encrypting a part of the url and posting it in the URL region of the browser. so that it will be directed to a common page from where the encoded page name will be got and decoded and redirected to that page.

Just as the same as a middle-man service to encryption and decryption purpose of the data. I was just thinking about the possibility of doing that. If possible I am going to give it a try.

I know that there is no gain in it, but I need to try that logic to gain knowledge...

ss125 18 Posting Whiz in Training

US, UK probably..

ss125 18 Posting Whiz in Training

@Ketsuekiame,
I dont want to make the user to view the file name... All they can see from the path must be only the domain name.

ss125 18 Posting Whiz in Training

Friends I have completed my engineering in India and now working as a software developer. I am now planning to undergo my higher studies abroad. But I am really got confused on the universities there and every one I asked told different universities as the best one.

I want a place to learn well, as well as, get placed by the campus drive there itself.

Please help me to find a good one.

PS:I am a newbie when it comes to abroad...

ss125 18 Posting Whiz in Training

@ DanielGreen,

I go with your code too.

ss125 18 Posting Whiz in Training

Friends

I have a login form. After successsful login, I have to redirect the user to welcome.aspx.

While doing this, the URL will be http://www.mangabooks.com/welcome.aspx

but I need the URL to be encoded like http://www.mangabooks.com/sdDFREdsfefrvgrwghWr34r

How can i do that?

Any help will be appriciated...

TIA.

ss125 18 Posting Whiz in Training

I am not sure, but the problem is in the

return newnode;

statement.Because that particular code is executed every time the data is inserted.

Hope this helps you...:-D

ss125 18 Posting Whiz in Training

The answer is Substring

ss125 18 Posting Whiz in Training

@Keerthi_1,

Its a common post. So not only me it will be visible to all.

If u wanna message your friend, U have to go to private message menu on the top of the page.

ss125 18 Posting Whiz in Training

@Keerthi_1,
Please avoid terms like this... Because this is a community which serves for online help to programers. If you wish to scold him please send a PM to him...

Anyway What you mean is right ;) Lolz...