Click here to Skip to main content
16,016,643 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi,
im uploading .xls file. but i want to check whether the file im uploading consist productname and price(this r 2 header), then only it should upload. otherwise it shouldnot....can anybody send the code using vb.net. this how im uploading .xls file... now add next code how 2 check?

please reply
thanks in adv.
send the next part code using vb.net

VB
Protected Sub UploadBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs)

      If (FileUpLoad1.HasFile And FileUpLoad2.HasFile) Then
          FileUpLoad1.SaveAs("C:\Documents and Settings\Administrator\My Documents\anil\" + FileUpLoad1.FileName)
          Label1.Text = "File Uploaded: "; + FileUpLoad1.FileName
          FileUpLoad2.SaveAs("C:\Documents and Settings\Administrator\My Documents\anil\"; + FileUpLoad2.FileName)
 Label2.Text = "File Uploaded:" + FileUpLoad2.FileName
      Else
          Label1.Text =  "No File Uploaded."
          Label2.Text = " No File Uploaded."
      End If
  End Sub
Posted
Updated 17-Mar-10 3:12am
v2

1 solution

Please do not repost[^] your questions.

If it gets lost in the rubble, edit the original question so it gets to the top of the question list (making it visible to more people).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900