In my ASP.NET project, I want to add a facility to my page so that when the user clicks a button, a 'browse file' dialog box directly opens up. After he selects the file in the dialog box, I want to save that image on the server, and update an imagebox based on that selection.
Is there some sort of dynamic 'browse for file' type dialog box that I can use?
You can check this demo.
Article (http://vremenno.net/js/javascript-snippets-plus-new-file-input/) is in Russian, but you can always use Google Translate.
Source code available here: (http://vremenno.net/examples/updated-file-input-styling/UpdatedFileInputStyling.zip)
Sorry for ugly links: this is my first post and I'm not allowed to use more than one link.
Related
I have a program which enables me to create a new user. To add a new user the program asks for a username and a password. Picture below.
When the user types a username and a password, then clicks save, the username and the password is saved into a table which I have created through Visual Studio 2015, in a database which has also been created through this IDE.
I need, upon creation of a new user, for the program to create a new text file for that particular new user. Then when a user logs in using this window,
their own text file which was created should appear in a text box which they can add things to. Every time they log in, they view their own text file. This takes place in this window
The save button, saves any edits to the text file in question, and the load button should load the text file. Ideally, I would like to remove the load button and have the content of the text file shown straight into the text box.
I have tried to work around this by breaking it down to pieces. I know a .txt needs to be created upon saving a new user, but I don't know where to go from there. I'm hoping for a solution that will enable the program to work on any machine.
I have looked up on the internet about database user files, creating a new user with files etc and the only thing I found was a question on here and it turns out that a database isn't a good solution to store text files. I have checked MSDN, YouTube, on YouTube I found how to upload an image to a user in a database, but not a text file.
Can anybody help me on this? It doesn't have to be code in particular just the steps in general then I can gladly look things up.
You haven't indicated the type of sql databasse, I assume it for sql-server.
For small files you can use binary or varbinary as described here.
For really bigger files as your requirement here the documentation on BLOBs in SQL-Server
I am using telerik rad editor in my projct. To add image I am using Image manager,while click on Image manager it opens the pop up where I can upload multiple images to the specified folder. It also showing me image editing option in same popup. My requirement is I don't want to show default image folder to user and don't want any image editing. I also want to hide add new folder option. please help me. If you have any sample code. Please share with me.
Thanks in advance.
i think the below url help you through this hope this helps:)
http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor---image-manager---removing-commands.aspx
<telerik:RadFileExplorer ID="RadFileExplorer1" Height="410px" Width="400px" TreePaneWidth="150px"
runat="Server" EnableOpenFile="false" AllowPaging="true" VisibleControls="TreeView,Toolbar,Grid,AddressBox"/>
for more info see this link http://goo.gl/k9LMuR
You can customize the dialogs so that the elements you do not want visible to the user are not, e.g. by setting their display CSS property to none or by editing the markup. See this demo for an example:
http://demos.telerik.com/aspnet-ajax/editor/examples/externaldialogspath/defaultcs.aspx. Note that just removing controls is likely to cause an error so you should test your custom dialog carefully.
Regarding the folder you show - in order to upload images you need to access the folder, so the files will be shown to the user. You can try implementing a custom provider to hide certain files, see this demo on the matter: http://demos.telerik.com/aspnet-ajax/editor/examples/dbfilebrowsercontentprovider/defaultcs.aspx.
I have to save webpage as image by passing page URL,i have found one solution on this thread Convert webpage to image from ASP.NET[^] but it doesn't give me proper image(e.g. tried URL http://www.bugmuncher.com/).
Also tried HTML to Image in C#[^] but not able to deal with IViewObject interface ,basically not able to add reference to get this interface.
I have to do something like http://www.usersnap.com does.I made it work on FF,Chrome and IE9 by using canvas element which is unfortunately not supported by IE8.
Can i get proper working solution for my need???
i think you mean taking a screenshot.
Here you are a link about it.
Capture screenshot of active window?
But here i found on the site that just you want. Please check it.
Convert webpage to image from ASP.NET
The webpage can be saved as image by 2 methods.
1. Press ctrl+p
2. Select "Send to onenote" in print prompt window.
3. Press ok.
Now the image can be saved from the microsoft office -> microsoft onenotebook and rightclick on your content. save as the image file.
Second method is by using snapshot via snipping tool.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How do you programmatically fill in a form and 'POST' a web page?
I've been looking for a way to allow a user to submit a form using C# or even HTML,so I get the source code, save it in a file and get the name of the text fields in order to submit the form.
for example logging with ur email to Facebook, gmail,stackoverflow ... or any page containing a form.
Before I ask how,is it possible?
My project is mainly to help visually impaired people surf the web easier! like get any html source code and be able to re-arrange the tags, omit images and such tags that won't benefit them,and try to give them the ability to log in using speech to text ...so my code will take the speech convert it to text field by field and submit the form when he/she's done! of course the name of the fields will be spoken using text to speech!
Thanks in advance
Have you looked at the WebBrowser control?
http://msdn.microsoft.com/en-us/library/aa752041(v=vs.85).aspx
It will allow you to automate surfing. You'll also be able to interact with the pages and modify values in text boxes, click buttons, submit forms.
Here's some talk about how to handle clicking.
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/2eed72f7-4fde-4730-abf7-738e9b6e87c4/
I've used that approach successfully in the past, but I will say it's problematic if you don't/can't control the website. If I write a program that will automate logging into facebook with this method it would require me telling it what URL to visit, what textboxes to fill, and what form name or button name to click.
If Facebook redesigns their layout - my code may no longer work.
If you are just interested in the logging in part; you might want to take a look at browser addons (I don't know if this will help at all, but I thought I would mention it). I use a product called, 'LastPass' (https://lastpass.com/) and it manages all of my user names and passwords. If I visit a site it is familiar with, it can automatically fill in the forms for me, allowing me to log in or completely enter my address.
How to change Design of Download Dialog Box in C#.Net?
How can I slove this problem?
(or)
How to hide Current Source File Path in Download Dialog Box?
You can't. Your question isn't very clear, but I am assuming you mean the download dialog that Internet Explorer displays when downloading a file.
The control is defined by the browser creators and is hard coded. No browser that I am aware of gives any type of access to this control or any way to change it.