Click here to Skip to main content
15,901,284 members

Comments by koleraba (Top 34 by date)

koleraba 20-Jun-13 10:51am View    
Yes it should be dbFilePath. Sorry I was changing something after I copied it from VS and I guess I made a mistake. Database=Players specifies the initial catalog and not the name of the file you are attaching. If you don't know the name of the catalog, attach the file manually with SQL server management studio and take a look at the name of the database catalog. Since I didn't know the name of your DB catalog I just put in Players. Otherwise I tried the code and it worked OK for me. For more info on connection strings check the: http://www.connectionstrings.com/sql-server-2008
koleraba 20-Jun-13 7:32am View    
Ansewers on the provided links suggest that when the user has elevated priviliges the code you provided should work when running of Win7 or later. That is: Expression windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator) should return true even if the current user is not an administrator but has elevated priviliges.
koleraba 19-Jun-13 22:00pm View    
You will have to be more specific than "Upload a file to grid view". Do you mean download a file from some external source to you web server and than use it to populate your GridView? Specify where does the file whose content you want to display in a grid view comes from.
koleraba 19-Jun-13 21:39pm View    
Can you be more specific than code is incomplete. What is missing?
koleraba 19-Jun-13 21:35pm View    
I am afraid I don't understand your question. I guess you have to export the data which is bind to your ListViewItems not the actual ListViewItems. Since your ListView is generated from items read from xml I don't understand what the problem is.