Click here to Skip to main content
15,912,578 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to add document from my computer in c:\\CVFOLDERS.I added documets from my computer in c:\\CVFOLDERS. But i have a problem that if first document .jpg format then second document added jpg format.But actually second document pdf format. I didnt understand.
example i will 1.documet format file1.pdf 2.document format file2.png if firstly i add pdf format second document saved file2.pdf .

C#
private void BindGrid(bool refreshDB)
       {
           _model = UserrModel.LoadModel();
           DSUserr dsUser = _model.GetDataSet();


           const int RESET_PAGE_INDEX = 0;
           if (refreshDB)
           {
               uwgUserr.Behaviors.Paging.PageIndex = RESET_PAGE_INDEX;

               _model.Refresh();
               divQuery.InnerHtml = _model.QuerySentence;

               dsUser = _model.GetDataSet();

               string cvPath = WebConfigurationManager.AppSettings["CV_PATH"];
               foreach (DSUserr.T_UserrRow rUserr in dsUserr.T_Userr)
               {
                   rUserr.DETAYLAR = string.Format"<input type=\"button\" value=\"Details\"  önclick=\"openDetaylar({0})\" class=\"gridButton\"/>", rUserr.Userr_NO);

                   string[] filename = Directory.GetFiles(cvPath, rUserr.Userr_NO + ".*");
                   if (filename.Length > 0)
                   {
                       rUserr.CV_1 = string.Format"<input type=\"button\" value=\"CV_1\"  önclick=\"openDetaylar({0})\" class=\"gridButton\"/>",Path.GetFileName(filename[0]));
                   }

               filename = Directory.GetFiles(cvPath,rUserr.Userr_NO + CV_original +".*");
                   if (filename.Length > 0)
                   {
                       rUserr.CV_2 = string.Format"<input type=\"button\" value=\"CV_2\"  önclick=\"openDetaylar({0})\" class=\"gridButton\"/>", Path.GetFileName(filename[0]));
                   }

                   
               }
           }
           uwgUserr.DataSource = dsUserr.T_Userr;
           uwgUserr.DataBind();
       }



[edit]Code block added - OriginalGriff[/edit]
Posted
Updated 29-Jun-13 23:30pm
v2
Comments
[no name] 30-Jun-13 13:36pm    
Okay I will be the brave one. I have read this several times but I can't figure out that it is that you want or what you are trying to do. Perhaps rephrasing your question might help. The explanation for what your problem is, does not make any sense at all.

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