Problem: my templatefield buttons will not save/open my files. Also, I tried a hyperlink instead of the buttons and I couldn't get the navigateURL to show properly.
I am listing the contents of a folder by using a directoryinfo object, and binding it to a gridview. I then have added a template field with two button controls in it ("save" and "open"). I want to be able to list all the file names on the left side of the grid, and a link to download/save/open the file on the right. Since I want this all to be dynamically driven, I have to find a way to use my codebehind to determine the proper file url for opening, and not hardcode any values. This is as far as I have gotten. I am not sure what is the easiest way to do what I want to achieve...
I wrote a small sub procedure to fire off when a button is clicked, but I cannot debug it because the button click wants to make the page postback. I cannot figure out how to force this option off. Basically it the logic was directed at the "fullname" which is the physical file path, and the commandname from the button and then uses that to determine the path for opening the file.
I was also experimenting with a asp:hyperlink trying to set the navigateURL='<%# eval("fullname") %>' which logically makes sense...but when rendered to the client it shows the link as "file://C:mantissadocumentationfile.doc", and clicking that file does nothing in IE and causes an error in Firefox saying it cannot associate a known protocol with it.
I have seen a few different articles through searching that show some of the functionality I need, but no example is fully dynamic like I need. I'm still an novice asp developer, so I am not sure how to achieve the end result I want from the options available. I would *like* to keep it simple and just use a hyperlink and magically have that hyperlink wired up to the actual file. I do not wish to embed my "files" inside my pages, I only want them to open as a new window. The extensions mainly handled here will be .doc, .txt, and .pdf. I read about using response.addheader("content-disposition", etc) to prompt with a save/open dialog box...but again I am not sure how to pass all the variables to make it fully dynamic.
My code still has bits and fragments of all the different things I have attempted to use to make it work.
It seems like this shouldn't be as trivial as I'm finding it to be, but I am trying to open a pdf file that gets generated on Page_Load() and saved to a directory. So I have the file path and I just need to know how to open the file.
I thought mine was working, but now on the button click, it will only do one or the other of my excel open calls. Am I doing something wrong here? It will not post an error or anything, just won't open the second file.
I am using VS 2005.An 1.aspx page is there, retrieving data from an xml file and having a button.On a button click same 1.aspx page should open new window retrieving data from another xml file with the help of query string.
i am new to this, would like to ask how can i check which button user click when downloading file, either open, save or cancel ? I need to update to the Database after the user click the save/open button, if cancel, then do not do anythinghere is example of code:
i have a web form in which i ve a button which will open a sliding pop up box(jquery) on click of it. In the same page i ve also a linkbutton for downloading files. Now the problem is first time wen i click that button it does nothing. (will not open popup box). Once i click on download button and then if i click that button it will open popup box along with download dialog box. Why is it happening so... is it because am using same event click for both these.
but download option is implemented in gridview_rowcommand()..
I have some dynamically-changing text, which I would like to appear as a hyperlink (i.e. underlined text which changes colour as you hover the mouse over it). However, I would also like this text to behave like an asp:Button object when the user clicks on it. This is so I can add some VB.NET into the click event of the text. Does anyone know how I can do this?
I have a pdf file that is stored in my Application folder . i.e "~/pdfs/MyPDF.pdf" I have a Hyperlink control on my form. On click of the Hyperlink , I need to be able to download the file or open the pdf in a new browser window.
I have just started ASP.NET 2.0 and VB and just wondered how you create links between pages when a button is clicked. I have a button on the page entitled 'index' and I want the site to go to the page 'links' when this is clicked. Any ideas? I am using Visual Web Developer 2008.Does anyone recommend any book for people starting out with ASP.NET and VB.NET?
As i am new to coding, what i was doin is i want to open a pop up window on button click in my default.aspx page.
and when the child window opens, it contains the grid view where we can select the relevant information and we hav to send this to the parent window
everything is working fine,but when we send the values to the parent page, all the text boxes and controls in the parent page are getting refreshed. and its being a problem, that the user has to re enter the data.
I don't need to say I am at the begining, therefore In VS2008 (VB) I want to click a button, do some code and depending on the code call a new page in the same browser (do not open another window).How do I call a new page (xxx.aspx