|
I am Developing a Web Application with ASP.NET 1.1
I have one project Folder which is virtual directory of IIS.
In this directory, I have one Folder named Photos in which I used to Store Photos. On my Web Page, I have a button named delete which I used to delete photo in the folder.
But when I click the button and apply the logic to delete the file, it raises an Exception that the access to the file is denied. I am using following code to delete the file. Please give me any suggestion.
FileInfo objectFile = new FileInfo(strFilePath); objectFile.Delete();
//This throws an Exception that Access to the file is denied on line objectFile.Delete()
Thanks,
Sandeep S. Sekhon
|
|
|
|
|
meybe You're IIs havn't Access To wwwroot Folder
make a property from wwwroot folder in the security tab Add IIs user And Get delete Access to IIs_WpG User
MHF
|
|
|
|
|
For me, you might grant access right to that folder for asp.net account....
<< >>
|
|
|
|
|
how can I grant Access right for the folder for the asp.net account.
Thanks,
Sandeep S. Sekhon
|
|
|
|
|
I cannot remember exactly right now
Maybe, you just right-click on the foler > in the security tab -> just add the asp.net account...
<< >>
|
|
|
|
|
HI Guys,
How we can hide values of variables in our querystring those are readable in the address bar? is there any way we can encrypt the url and when it is required we can de-crypt it also like yahoo do??
(http://www.yahoo.com/_ylh=x3oDMTB1M2EzYWFoBF9TAzI3MTYxNDkEdGVzdAMwBHRtcGwDaWUtYmV0YQ--/r/m1)
It does not change the domain name but change the folder name and query string's values.
and url encryption should be automatic.
Please provide the solution in Asp.Net with C#
|
|
|
|
|
|
Hi
i am using .NET 1.1.
I am populating some data in DataTable using StoredProcedure.
DataTable dt = new DataTable();
DataRow dr;
DataSet ds = GetDataFromSP();
for (int k=0;k{
dr = dt.NewRow();
dr[0] = int.Parse(ds.Tables[0].Rows[k]["ID"].ToString());
dr[1] = ds.Tables[0].Rows[k]["COL1"].ToString()
dr[2] = ds.Tables[0].Rows[k]["COL2"].ToString()
dt.Rows.Add(dr);
}
//Binding to Grid using dt.
In this DataTable(dt) with same primary key multiple rows are returning by SP.
i want to check DataTable weather with this primary key is there any dupliate entry. if entry exists in DataTable, avoid the adding into the dt.
how to do this?
any sounds appriciated. awaiting for response.
regards
GV Ramana
|
|
|
|
|
one thing which u can do is to get expected result from sp by using distinct keyword and if in yours case that is not possible. then take a string variable and put whenever you add the row in datatable also add that primay key in this string.(this will containf the comma separated primary keys which have added). and before adding the row to datatable check that whether this primary key is already there in string.
//declare string as empty before for loop
dr = dt.NewRow();
dr[0] = int.Parse(ds.Tables[0].Rows[k]["ID"].ToString());
//check that string contaims this primary key or not
if( string does not contain this primary key)
{
dr[1] = ds.Tables[0].Rows[k]["COL1"].ToString()
dr[2] = ds.Tables[0].Rows[k]["COL2"].ToString()
dt.Rows.Add(dr);
//add this primary key to string
}
|
|
|
|
|
hello, i'm ali.
How can i set a button as Accept Button in asp.net, that when i prees Enter that button cald?
please help me.
Devil
software Engineer
|
|
|
|
|
Hi,
In ur aspx page, u find the properties window for the Form ( ie tag... Form1....Ok ). Then set the Default Button property as ur button.
Now it works.... Every time u hit the Enter key, that button Click event fires.
Hope it works...
Cheers!!!!!!!!!
Regars,
Jay
|
|
|
|
|
i want to identify the datatype in the textbox by validating the value in the textbox by custom validation for checks whether the value is of the type "integet" or "char".with the identification i can able to responsd the user that example "please enter only numeric values"
The above can be acheived by either by specific functions if available or by
server custom coding method answer me guys ...
coding makes me interesting in dot net
|
|
|
|
|
Or you can just use a CompareValidator[^] control, setting its Operator property to DataTypeCheck .
|
|
|
|
|
Hi everyone!! how can i create and show custom right click menu options in Web Forms?
Thanks!
|
|
|
|
|
Hi there,
You might check out the event oncontextmenu in js....
<< >>
|
|
|
|
|
Hi,
But would you give me some details. im a beginner in asp.net.
Thanx enjoycrack!!!
-- modified at 3:23 Thursday 3rd August, 2006
|
|
|
|
|
Hi,
You just google them... or you might check out this one clickety
<< >>
|
|
|
|
|
suppose in my asp.net page there will be a thum image and whenever user will place the mouse pointer over the image then i want to show original big image in same page through ajax but not by atlas.means just tell me how could i fetch and show a image in a page from the server by ajax.pls give me a sample code.
tbhattacharjee
|
|
|
|
|
hi friends
Name of the folder given by the user at run time. if any space in that name i am replacing it with _ The code
If fname.IndexOf(" ") >= 0 Then
fname = Replace(fname, " ", "_")
End If
But it comes inside the loop but not replacing. Please Help.
Thanks & Regards
Prya
|
|
|
|
|
Why don't use
fname= fname.Replace(" ","_");
MHF
|
|
|
|
|
suppose my xml is
<document type="Sales Invoice" transactions="1">
<imagepath>\\90104-server2\FTP Upload\New Look Retailers Ltd\001;29552;2;240706;150931\00000008.tif
<archiveimagepath>\\s55701\P2D\FTP Archive Redundant\New Look Retailers Ltd\001;29552;2;240706;150931_1009\00000008.tif
<type>Expense
<invoicenumber>6058
<invoicedate>23/05/2006
<invoicetaxpointdate>NOT_FOUND
<currencycode>GBP
<netamount>4957.25
<taxamount>867.52
<grossamount>5824.77
<transaction>
<lineno>1
<orderno>PP31287
<description> ACCOUNT NO: N003 - ORDER NO: PP31287 - LINKED REF NO: CO5701856PL401 - RE: COVENTRY STORE - TO SUPPLY - INTERNAL BRANDING SEGMENTATION WORKS FOR - COVEN -114Y STORE
<quantity>1
<price>4957.25
<nettvalue>4957.25
<taxvalue>
<transaction>
<lineno>1
<orderno>PP31287
<description> ACCOUNT NO: N003 - ORDER NO: PP31287 - LINKED REF NO: CO5701856PL401 - RE: COVENTRY STORE - TO SUPPLY - INTERNAL BRANDING SEGMENTATION WORKS FOR - COVEN -114Y STORE
<quantity>1
<price>4957.25
<nettvalue>4957.25
<taxvalue>
so my master part is Document tag and there could be many detail part like Transaction tag.
so pls help me how could i read this type of master detail xml data .specially detail part in a loop by XmlTextReader.pls help me with source code.
tbhattacharjee
|
|
|
|
|
hi,
how to download file.
i want click event time download,
i am using asp.net1.1,
plz help anyone
thanks
|
|
|
|
|
Not sure I can get your clue...
But one user want to download file, you just give them the url ...
<< >>
|
|
|
|
|
In my application i want do some thing once when page is loaded for first time i put this in
if(!Page.IsPostBack){
/code here
}
BUT this run 2 time when page is loaded why? and How can solve it
MHF
|
|
|
|
|