It's frustrating because it's not working. I'm very much a novice at this. I've tried several different ways of taking the folder "~/files/" and the file name, tying them together and deleting the file.
You can pass the virtual location to your file and it would delete the real file from the machine. The Server.MapPath[^] should be used when working on a web application, on an HTTP server you don't specifically share the actual path to a resource, instead you share the virtual path to the file using a URL and a domain and so on, in such scenarios Server.MapPath() is used to handle the virtual paths and converts it to real path; such as D:\Files\Location.format. You can read the MSDN document I have attached to the answer too.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
I have a page with 6 textbox. I want to fetch data from database ms access but there may be many combination like user fill only one box and fetch or user can fill more than one box and fetch data. there may be many combination.
i have emp_id, from date, to date, expiry date, request number, status.
combination may be user only fill one box i.e emp_id or from date or status etc.
or user can fill emp_id and status and request number and from date etc.
No, you just check each one in order, and if it contains a value then you add the details to your query. After checking all textboxes you will have built a query that contains parameters from only those textboxes that have been filled in.
I have a page with a grid view and it has a link button called Details. When I click on Details it shows the detailed view below panel with all textboxes and dropdowns. I also have a button Export-to-Excel. This button when first loaded will be one. But soon clicked on detailed view it appears twice. wondering where is this coming from. I don't see anything wrong on ASPX page.
Your help is much appreciated.
Try to check your detailed button click-event in code behind if you have declare the button in The second button click-event that will happened ,or if declare your button in The page-load event That will happened tow if it does not work try to post your code
anyone can tell what happen when people use cookie less form authentication in any asp.net project. if we do not work with cookie then how could i persist the user login for next 7 days means once user login and so next 7 days user do not have to login until the user auth cookie expire ?
looking for discussion and guidance or anyone can redirect me to relevant article on this topic. thanks
If you don't want to use postbacks and the asp.net page lifecycle then you should use ajax instead and maybe not use any server controls at all, just use normal <select> instead of asp:DropDown etc, however that bit is optional.