|
The error is suggesting that your ASP.NET application does not have priveledges to write to the upload folder - you indicate that you were looking at the "property of project" - did you mean the properties of the upload folder?
What operating system are you running? Are you using NTFS for the file system?
|
|
|
|
|
|
Vasudevan Deepak Kumar wrote: For your problem, you can open inetmgr. Navigate to the virtual directory, RightClick properties and give 'Write' Access from there. That alone should work.
Ouch. You just gave the entire world write permission to the folder.
If the file system is not NTFS, it is not a permission problem. A FAT disk has no permission system at all.
---
b { font-weight: normal; }
|
|
|
|
|
Also, you might want to check this condition: if your machine (XP) is not joined to a domain, then you don't see the Security tab by default. If this is the case, you can display this tab as below:
+ Go to the Folder Options dialog (you can see this in Control Panel, or in the Tools menu of the Window Explorer).
+ In the View tab, under the Advanced Settings, uncheck the "Use simple file sharing (Recommended)" option.
|
|
|
|
|
hai every one
i m ajay
facing a problem related to modal dialog boxes
i have one page on which i have taken two list boxes.i m populating the first list box frm database.ther r 2 buttons add and remove.u can add items in the second list box and vice versa.
working fine for me
problem arises when i m opening this page as a modal dialog box frm anothr page.
when i m selecting a value frm first list box and click on the add button in dialog box it opens a new instance of the same page and allow me to add.
i did not want this behaviour.i just want to do all operations in the same dialog box .
plz help
any suggetion will be highly appriciated.
ajay
coding of the page frm where i m opening dialog box(containing list boxes)---
Public Class WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents Label2 As System.Web.UI.WebControls.Label
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Dim listitems As String
listitems = Session("listitems")
'Response.Write(listitems)
Label2.Text = listitems
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Session("temp") = TextBox1.Text
'Response.Redirect("webform2.aspx")
Button1.Attributes.Add("onclick", "window.showModalDialog('webform2.aspx', null,'status:no;dialogWidth:370px;dialogHeight:220px;dialogHide:true;help:no;scroll:no');")
End Sub
End Class
coding of webform2------
Imports System.Data.SqlClient
Public Class WebForm2
Inherits System.Web.UI.Page
Dim str1 As String
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents lstbox1 As System.Web.UI.WebControls.ListBox
Protected WithEvents lstbox2 As System.Web.UI.WebControls.ListBox
Protected WithEvents btnsubmit As System.Web.UI.WebControls.Button
Protected WithEvents btnremove As System.Web.UI.WebControls.Button
Protected WithEvents BtnBack As System.Web.UI.WebControls.Button
Protected WithEvents hdFieldNames As System.Web.UI.HtmlControls.HtmlInputHidden
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
'Dim sql_conn As New SqlConnection("server=mms-server2;uid=sa;pwd=miqaat098;database=bank_1.1")
Dim sql_conn As New SqlConnection("server=mms-server2;uid=sa;pwd=miqaat098;database=safe")
Dim str As String
Dim zRow As DataRow
sql_conn.Open()
Dim dset As New DataSet
Dim temp As String
temp = Session("temp")
Dim sql_cmd As New SqlCommand("select * from mms_dataitem_master", sql_conn)
' Dim sql_cmd As New SqlCommand("getfieldvalues", sql_conn)
' sql_cmd.CommandType = CommandType.StoredProcedure
'sql_cmd.Parameters.Add("@DataItemName", temp)
Dim sadapter As New SqlDataAdapter(sql_cmd)
' Dim sadapter As New SqlDataAdapter
' sadapter.SelectCommand = sql_cmd
sadapter.Fill(dset)
lstbox1.Items.Clear()
lstbox1.DataSource = dset
'For i = 0 To dset.Tables(0).Rows.Count
If lstbox1.Items.Count < 1 Then
For Each zRow In dset.Tables(0).Rows
'ListBox1.Items.Add(dset.Tables(0).DefaultView(0).Row.Item("name"))
lstbox1.Items.Add(zRow.Item(temp))
Next
End If
sql_conn.Close()
End If
End Sub
Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubmit.Click
If lstbox1.SelectedIndex < 0 Then
Me.btnsubmit.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');")
Else
Dim Item As ListItem = New ListItem
If lstbox1.SelectedIndex > -1 Then
Item.Text = lstbox1.SelectedItem.Value
Item.Value = lstbox1.SelectedItem.Text
lstbox1.Items.Remove(lstbox1.SelectedItem)
lstbox2.Items.Add(Item)
'concatinates the second list box values in a hidden texbox hdFieldNames
hdFieldNames.Value = hdFieldNames.Value & Item.Text & ","
End If
End If
End Sub
Private Sub btnremove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnremove.Click
If lstbox2.SelectedIndex < 0 Then
Me.btnremove.Attributes.Add("onclick", "return confirm('Second ListBox Is Empty.Click On The Add Button To Insert an Item In The List');")
Else
Dim Item1 As ListItem = New ListItem
If lstbox2.SelectedIndex > -1 Then
Item1.Text = lstbox2.SelectedItem.Value
Item1.Value = lstbox2.SelectedItem.Text
lstbox2.Items.Remove(lstbox2.SelectedItem)
lstbox1.Items.Add(Item1)
End If
End If
End Sub
Private Sub BtnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnBack.Click
Session("listitems") = hdFieldNames.Value
Response.Redirect("webform1.aspx")
End Sub
End Class
|
|
|
|
|
Hello,
I have a big problem.I have a page which has html and asp controls on it.COmplete validation is done using javascript.Now I have 2 dropdownlists one for countries and other for states.I should get the states based on the countries.So I have to set the autopostback of countries dropdownlist to true.The button that I have is submit button of html.the problem is how to write the code to update the data on the page.Right now I have the code in page load event.But as autopostback of countries dropdownlsit is true the page gets posted in between.So I cannot have the update code in the pageload.As the controls are html cotrols how do i write events for html.I cannot write javascript to update the database.It is very very urgent for my project.I need it badly.KIndly some one give me a solution for the problem.
|
|
|
|
|
I have no idea what your talking about.
"the problem is how to write the code to update the data on the page"
Cant you put it in the code in the:
Private Sub DropDownList_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DropDownList.SelectedIndexChanged
?????
|
|
|
|
|
Change your submit button from an HTML button to an ASP.NET server control <asp:Button runat="server"/> . Create an event handler for its OnClick event and put your update code there.
-- modified at 9:02 Thursday 27th April, 2006
By the way, you might want to refrain from adding things like "It is very very urgent for my project.I need it badly." to your forum posts. That's a good way to get your message ignored.
|
|
|
|
|
Hello Mr.Mike,
As I have clearly mentioned I cannot change html button to asp button.I have javascript validators.Some Conrols are html controls and some are asp controls.For all the HTML controls i am using javascript to validate.Now I have to continue with that form as it is.I cannot change the button to asp button.How to go abt it.Ok clearly speaking I should send all the values in this page to another page on the button click.
Uma
|
|
|
|
|
Uma Kameswari wrote: As I have clearly mentioned I cannot change html button to asp button
I see no mention in your original post that you "cannot change html button to asp button". There was nothing in your original post that "clearly" indicated anything of the sort.
Uma Kameswari wrote: I have javascript validators
No problem. Lots of ASP.NET pages use custom client side javascript for validation. You can use the OnClientClick property of the <asp:Button /> to run your javascript validation.
My original suggestion stands. In my opinion, your best course of action is to code an event handler for the Click event of your submit button (making it an <asp:Button /> ) and perform your database update in that code.
|
|
|
|
|
ok Mr.Mike I will check it tomorrow .
|
|
|
|
|
Hello Mr.Mike,
Can u tell me how to use the onClientClick property of <asp:button>
|
|
|
|
|
Sure - it's an ASP.NET 2.0 property, and you simply assign the javascript you want rendered as part of the client-side onclick javascript event.
The MSDN documentation for OnClientClick[^] has a good example.
|
|
|
|
|
I am developing an application on my local machine in the office in asp.net 2.0 to send emails.
The application is now able to send emails to external and NOT to internal email addresses.
Do you know what is wrong please?
Thanks
|
|
|
|
|
These types of things often turn out to be SMTP configuration. Are you running your own SMTP server? Is someone else responsible for the SMTP server for "internal" email addresses?
|
|
|
|
|
I don't know.
I am running the application (Which I am developing) in my machine.
If the site is sending emails externally the why it does not send emails to anyone internally?
Thanks
|
|
|
|
|
fmardani wrote: I don't know.
You have to know what SMTP server you are using.
fmardani wrote: If the site is sending emails externally the why it does not send emails to anyone internally?
System administrators can establish different rules for different SMTP servers. It may be that your organization's email server has restrictions on who is allowed to use it as a relay. You need to check with your SMTP system administrator(s).
|
|
|
|
|
Hello Friends,
How to fire RowCancelingEdit of gridview programmatically. Actually i have implemented Atlas AJAX of Microsoft, and after clicking inbuilt update button of the GridView record is updated but Grid remains in edit mode. Then i have to presss Cancel button to bring it to normal mode. Any solutions to this problem guys..
thanks in advance
Sheel Gohe
|
|
|
|
|
I think you can set the EditIndex[^] property of the GridView to -1 .
|
|
|
|
|
Mike i tried that but its not working....
Sheel Gohe
|
|
|
|
|
how to build a website in which users make their own web pages.
|
|
|
|
|
Well, it's always important to start at the right place for this type of thing. I'd recommend looking here[^] first, with special attention to #2.
|
|
|
|
|
Hi,
I have 1 html file it has some hot fields, i use that file as template, i read that file programaticaly and create 1 more html file in that i replace hotfields with desiared data now my image is ready and i want to copy that on client file i pop up masage on client pc to save that file as we normaly get mesaage to save files when we try to save any file from the internet and it get copy successfuly but 1 problem is their and that is
It has 2 images i have used in that file now thos images dosenot get copied on the client pc
Please help me
(I m working in ASP.Net)
Regards,
Harshad Pednekar
|
|
|
|
|
You could use fully qualified (absolutely referenced) URLs to your images - instead of
src="/myFile.gif" for example, you could use
src="http://myserver/myApp/images/myFile.gif" At least your client could then see the images.
|
|
|
|
|
Hello
In my web application, I made a excel export of my screen (a simple informations grid !) and i tried to open that excel export on a new window (to not overwrite my browser content) and i used this instruction :
this.Page.RegisterClientScriptBlock("xlExport",@"<script language = javascript>javascript: window.open('/MyApplication/DefaultController.aspx?PageId=ExportXLPage&xlFiles=" + fileName + "','NewWnd','resizable=1,toolbar=1,location=1,status=1,menubar=1,scrollbars=1');</script>");
to inject this code dynamically into my asp page, so that this code will be executed and the page "ExportXLPage" will be opened.
And in that destination page i putted this intsruction,
Response.Redirect(FileName));
to display the excel file wich i made with these headers (just to mention) :
string str = "charset=utf-8";<br />
oStringBuilder.Append("<HEAD><META http-equiv=Content-Type = application/ms-excel;" + str + ";Content-Disposition:attachment;filename=" + fileName + ".xls></HEAD>");<br />
That worked fine on some machines and didnt on other ! In fact the new window opened and quickly closed whithout displaying anything on a machine with XP system and IE 6, and worked fine on , for example, a machine with WIN2000 and IE 6.
Even worst : when i pressed CTRL key and request that export, it worked and the new window was perfectly displayed with the usual options (save/open/cancel) of the excel file. And i have to mention that i already desactivated the POPUP blocking system of my internet explorer !! (that could be normally desactivated with hitting CTRL key).
Could that be related to the server's configuration (i mean system version...), or the client's configuration or may be both of them ?!?!
Or did i simply wrongly opened that new window or badly built my excel file ?
(All these problems occured when my application was published on my client server, but when i tested on my local machine, every thing was alright !!)
Thanks in advance for helping soon
|
|
|
|