Web Forms :: Way To Upload Control To Allow Users To Basically Create An Avatar For A Record
Nov 10, 2010
I would like to use the image (file) upload control to allow users to basically create an avatar for a record they manage.I would like to enforce the following:1) Type (PNG only)2) Dimensions (X pixles by X pixels)3) Size (less than XYZ kilobytes) 4) Rename the file to something organized (for my sake)5) Not open some gaping hole in my file system (security)Some of these are pretty easy to do it seems.
I know the asp.net file upload control only allows users to select one file at a time, however i am looking for another way using asp.net to allow the users to select multiple files?
I want users to select a record in the GridView and then have that record open up in the Detailsview. How would I go about getting these two tools to communicate?
I need to figure out a way to prevent users from uploading a couple file types in my vb.net page. How can I prevent users from uploading .msg or .gifs during a file upload?
We have a scenario where we would like to allow our users to upload images to the site. We are running on ASP.Net. A quick search did not result in anything good. It would be great if the control is free/open source but we do not mind paying a little bit.
I have tried using the FileUpload control in ASP.net and found some strange problems. I have decided to scrap this control and create a custom control. Is it possible to create a file upload control from scratch?
I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an encrypted password format), and a SqlRoleProvider. I need to know if it's possible to administer the users (create new users, assign them to roles, etc.) from a windows application - the powers that be don't want any administrative functionality in the web app itself.
Here is the membership provider definition from web.config:
[code]....
So, obviously, I have a Sql Server database that contains the users and roles for the web app. I'd like to create a separate windows app that references the web app assembly, and use the configured MembershipProvider, RoleProvider, and machineKey to create users, assign users to roles, etc. If that's not possible, I can duplicate the configuration settings from web.config within the windows app. But I don't know how to do this either.
How do I allow users to upload files to a subFolder under the root web folder?
1. Display a list of filenames of file type (.doc, .txt, .pdf) on one webpage(ListOfFiles.aspx). 2. Make those filenames hyperlinks so that when clicked on, the file is displayed in the browser. 3. Have another page(Admin.aspx) that allows the user to upload and delete those files residing in that subFolder.
Here is what I am doing. Gridview to list a table. The table is mostly keys so I display one value and have a dropdown list to update the Instructor (key). Like one normally does, the dropdown list has a display value and a 'hidden' value which should be the value updated to the table, in the UPDATE event.
It does not work.
(1) When I click 'edit' the value in that field that was on the list of the grid is NOT the same value in the DropdownList, so the index of the ddl is not coming from the value on the grid (which is a hidden field on the grid).
(2) When I pick a new instructor, the value put into the table is basically random.
I would debug it but I have no idea what events to look at or how to look at the actions taking place during edit and update.
I've got a DetailsView control on the page, which includes a FileUpload control. Both parts work individually e.g. I can upload a file and insert a record but what I'd like to be able to do is do both with one click - either on the Upload Buttton or on the Insert record text.
I have a button click event:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
But I'm not sure how to call the Insert Record event on the detailsView control.
I have another problem is that I have Placed a file upload control in Empty template of Gridview to have multiple record insert. I have used viewstate to save multiple record into database. But problem is that I am able to find the control but it not giving any value.I have following code.
We have a simple SQL Server database with an ASP.NET front end.
I can easily update a record from my browser.
Another person cannot: he edits the field and hits the "update" button, but the change is not propagated to the database. The old value remains. He is using Internet Explorer. I checked the database, and his change is not propagated. There is no error thrown.
He WAS able to edit in May. Today he can't. but I can.
I can even update it with the Google Chrome browser.
I am using .net membership. i got my login page where i want to get the avatar (property) of the current login user and save in a cookie but dont know how can i achieve that?
I visited this Link to study about Factory design pattern.http://wiki.asp.net/page.aspx/310/factory/ But i am confused about it still. What i understood is that we must use an Interface to define a class .In the interface we will give the prototype of functions and later on we will define it in concrete class. Is that simple concept is Factory design pattern ?
I have a situation where I'm using a single Masterpage and two Content Pages. The Master page basically contains a menu built using an HTML Table. The one Content Page contains the marjority of my site content. The way the menu works is that when user selects a menu item, a javascript function executes that evaulates which menu item was selected.
Now, this is where I'm not sure what to do next. Should I load the next Content Page in this javascript function or somewhere in the CodeBehind of the Content Page? I'm trying to find examples where I can load a page using Javascript but not having any luck.
I have a database of users that we used to have on a different system. The users already have their username and passwords associated with.
Now we are switching the entire system to .Net , and we will be using the membership to authenticate the users and start creating the new users with the wizard.
My question is : how could we import the users from a different database (mysql) , to the membership database on MS SQL ?
And also the passwords on the mysql database are in clear text , when we import them to the membership database on ms sql , is it going to apply the hash on them ?
My testers have discovered that if you type free text into a file upload input then none of the buttons on the page work until that text is removed (so the page cannot be submitted).
I am able to replicate this with the following ASPX code (with no code behind):
(Note that I haven't bound any handlers to the page; despite this, the page is submitted when the submit button is clicked only if no text is entered into the upload text box)
Is there any way to prevent users from typing free text into a file upload control? It seems that this is only possible in IE - Firefox and Chrome natively prevent text from being entered into upload input fields.
I've seen solutions elsewhere which suggest hiding input and replacing it with a label / button combo, but this seems like it might cause more problems and work inconsistently across browsers.