Jump to content

wooikeim

Members
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

0 Neutral

About wooikeim

  • Rank
    Newbie
  1. wooikeim

    Downloading error

    No Solution for this? Or anyone got any code for downloading in .Net vbscript?
  2. wooikeim

    Downloading error

    Oh, I'm so sorry, didnt see that statement. Anyway, i have put it in the next line, but then got another error.Dim downloadFile As System.IO.FileStream = New System.IO.FileStream(filename, IO.FileMode.Open) <Access denied >error msg- To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.I had follow that instruction but still cant work
  3. wooikeim

    Downloading error

    You refer my code above, Response.Write(downloadFile.Length() & "#") is already there. So whats the problem
  4. wooikeim

    Downloading error

    sub Datagrid1_ItemCommand (sender as object, e as DataGridCommandEventArgs) if (e.CommandName= "Download") then Response.ContentType = "application\octet-stream" Dim filename as string=new string("C:\Inetpub\wwwroot\tution\doc") Dim downloadFile As System.IO.FileStream = New System.IO.FileStream(filename, IO.FileMode.Open) Response.Write(downloadFile.Length() & "#") downloadFile.Close() Response.WriteFile(filename) Response.Flush() Response.End()I got the problem in downloading a file, it show me End of statement expected. i not sure my code correct or not. please kindly tell me what happen here. thanks......this line is highlighted <Dim downloadFile As System.IO.FileStream = New System.IO.FileStream(filename, IO.FileMode.Open) >
  5. Where is the tutorial? do you mind give me the link so that i can redirect there. thks
  6. Hello, can you explain more detail? I not really understand the flow. A bit blur here.In my situation, after i successful login then the forum should in the main pageQuestion1)why need topic_id, reply_id, reply_content?2) The topic_name in the forum should put in hypperlink or what?3) How could i retrieve the topic name from the database and display in the system?
  7. wooikeim

    New window

    Hi, i not sure whether this in tutorial or not but i couldn't find it. I want to know how to open new wndow after i click on the link. If i use response.redirect("xxx.aspx") it will open the page in parent. In VBscript pls. thks
  8. wooikeim

    uploading file

    Oh thank you very much, it work after i use "postedFile.SaveAs(savePath & "\" & filename)" , thank a lot man.and also thanks to aspnetguy,jesh,pulpfiction.i been doing this for whole day I am newbie in .net
  9. wooikeim

    uploading file

    Well, it still the same, don't know what happen there. i had try debug it by putting this and it successful store in database, but the file cant save in the location(C:\Inetpub\wwwroot\tution\file).Dim savePath As String = "C:\Inetpub\wwwroot\tution\file" Try Dim postedFile = uploadedFile.PostedFile Dim filename As String = System.IO.Path.GetFileName(postedFile.FileName) Dim contentType As String = postedFile.ContentType Dim contentLength As Integer = postedFile.ContentLength Dim myConnection As SqlConnection = New SqlConnection("server=(local);database = MegaArif; trusted_connection= yes") Dim mycommand as sqlCommand= new sqlCommand("insert into notes(content, subject_id) values('"& FileName &"', '"& lblsubjectid.text &"') ",myConnection) mycommand.connection.open() mycommand.executeNonQuery() mycommand.connection.close() postedFile.SaveAs(savePath) message.Text = "uploaded" Catch exc As Exception message.Text = "uploade failed <br/><br/>" & exc.MessageEnd TryEnd SubI had also try another way, reference from http://www.superdotnet.com/Article.aspx?ArticleID=26Another error msg when i use the method.(Exception has been thrown by the target of an invocation)
  10. Dim mycommand As SqlCommand = new SqlCommand("query",myConnection)is "query" fix? or what?
  11. wooikeim

    uploading file

    Well, i had try to put it as full control, but still the same.
  12. I had make a connection to the database. What i want now is to display the subject id in a label called lblsubject_id.--------------------------------------------------------------------------------------------------------------------------------------------------Dim mycommand as sqlDataAdapter= new sqlDataAdapter("Select subject_id from tutor where tutor_id = '"& lbluser.text &"' ", myConnection)b4 this what i do is show in datagrid, but now i want it to be display in label. Dim ds as new dataset() mycommand.fill(ds,"tutor") DataGrid1.datasource=ds.tables("tutor").defaultview Datagrid1.databind()what shud i do here?
  13. wooikeim

    uploading file

    (=_=") I had clear the Use simple file sharing. And created ASPNET(machinename/ASPNET) Modify option is checked, but it still show me Access to the path "C:\Inetpub\wwwroot\tution\files" is denied. I really get Frustrated......
  14. wooikeim

    uploading file

    You say about:-"Right click the target folder and choose Properties.Switch to the Security tab.If the ASPNET user is not shown in the list, add it.Click on the ASPNET user account and make sure that the Modify option is checked."I can't find security tab at all?only got General, sharing, web sharing and customize.sorry for disturbing.
×
×
  • Create New...