Web Forms :: Upload And Display In Folders As Per Category
Apr 14, 2014i want to develop image album on my website
1 upload photo category wise
2 view photo category wise
i want to develop image album on my website
1 upload photo category wise
2 view photo category wise
I am working in a project that is a musical website. I want to display the web page with all categories I have. In my database , named Category_Master, I have two fields like Category_Id (which is a primary key ) and Category_Name. I have generated category_Id with NEWID() function. The category_Id is not supposed to display on the web page. But, i have to select Category_Name and according to that , I have to get the category_Id. If I am using Static connection with SqlDataSource, i am able to make visible=false property so that the category_id won't be visible. But , at that time, I can't write code to Select the category_id of the selected index.
If i am using disconnected approach, I filled the dataset with the Category_Master, and binded it to GridView. But, at that time, I can't hide the category_id from the user. I want to select category_id by clicking on the category_name with out displaying category_id ..?
I want to store the image in specific folder by giving some id to that and Dynamically i want to generate new folder for storing another image.I am using FileUpload.saveas(sever.map(imgpath))but with these method i am able to store the image in project folder and i want to create a new folder etither in project folder or anywhere in machine and in that folder again one new folder with some name and in that i want to save image with unique id.
View 1 RepliesI want to display a menu on LHS which display Category and an arrow. When one clicks on arrow Products corresponding to that Category are displayed. How can one do that?
Menu: Category1(Arrow Image)
Product1
Product2
Category2(Arrow Image)
Category3(Arrow Image)
How to browse and select the folder in asp.net. And after that i need to read the files from that folder and save it in another folder in my system.
View 1 Repliesis it possible to make an upload button that sent an image to two folders
my products page details and my product list have different image folders and in the add product i want to be able to do the above with the image field in the admin add product page
Listing folders in folders then creating arrays in JS for each of the folders?
Directory Structure:
I have a directory structure as follows;
ad_folder
--folderA
--folderB
--folderC
--anotherFolder
--etcfolder
--afile.aspx
--anotherfile.gif
ad_code
--folderA
--folderB
--afile.aspx
--anotherfile.gif
ad_prep
--folderA
--etcfolder
--afile.aspx
--anotherfile.gif
ad_bin
--etcfolder
--afile.aspx
--anotherfile.gif
other Folder
files folder
assetsfolder
index.aspx
web.config
image.gif
Task at hand:
I want code in VB.NET to create javascript arrays of the folder contents that can then be used on the client end. I only need arrays for all folders contained in folders starting with ad_ and an array for all the base folders . like so:
var folders=["ad_folder","ad_code","ad_prep","ad_bin"];
var ad_folder=["folderA","folderB","folderC","anotherFolder","etcfolder"];
var ad_code=["folderA","folderB"];
var ad_prep=["folderA","etcfolder"];
var ad_bin=["etcfolder"];
note that I do not know the number of or the names of the folders, they can be different in different cases, I only have the root path.
[code]...
How can I display Windows XP 32-bit folders in a web page as TreeView e.g.:
C:LibraryLawsLaw1law1.doc
Then I can press on the link to open a word document.
End users create folders and place Word documents inside , and the web page reads the folders and display it as TreeView and allow end users to open Word documents.
I have class Item & Category
[Code]....
How can I display Category Name? Do I have to add CategoryName into Item class and bind it on aspx page or is there something similar to Html.DropDownList?
[Code]....
i create example using Northwind database so i create a new website and add new ADO.Net Entity Data Model (.edmx) called Northwind.edmx and i add Categories and Products table inside this (.edmx) file
and add new ADO.Net Data Servuce called "ADODataService" and add it as WebReferences called NorthwindService
so i add new web page and drag DropdownList and Gridview as i want to bind Dropdownlist to all categories and when i select category from Dropdownlist bind Gridview to all Products related to this category
so my code
[Code]....
and my code
[Code]....
so when i select category from Dropdownlist nothing happen :(
also you will find commented code in method BindCategory whuch is not work also.
I'll try to explain as simple as I can in text what my problem is. I don't see any other way to make my issue clear.
I have a GridView that uses an ObjectDataSource.
The ObjectDataSource has an DataObjectTypeName defined, so I pass/get complete objects or list of objects to/from the data access methods.
The objects I'm working with, let's say we work with Book objects, contain a Title and a Category, BUT the Category is an object itself. When the Select method is called, we get a List of Book objects, which is perfectly displayed, overridden ToString method in the Category objects within the Book objects.
The problem I face is that I can't find a way to update the category in my GridView. What I did already accomplish is:I used a template field in the GridView for the Category so I could use a DropDownList for that field in Edit mode.
I bound the DropDownList to another ObjectDataSource that gives me a list of CategoryObjects.
So when I enter Edit mode... the row shows a nice ddl with the available categories. It even selects the right original category.
So far so good... but when I want to save my new selection, I get an error that a string (the selected category in the ddl) cannot be converted to a Category object (that's what the Book object, that is going to be used for the update, expects).
I have two tables... Laptop category and Laptop details ... Laptop of each category is displayed using Imagebuttons in my website... eg: Dell.HP,Compaq and each category is associated with unique ID like 1 ,2, 3, etc.
Based on this category ID when i click on particular image button it should redirect to another web page ( I ve specified the page in each ImageButton's PostBackUrl property as LaptopDetails.aspx ? catId=1 ....). And in Details page I would like to display the sub models of particular Laptop Category...
for eg Dell has three sub models INSPIRON 1464, INSPIRON 15 and INSPIRON 15R
sub models has to be displayed with image and all the details from the database...
How to create a sub page for each grid view row select?
View 1 Repliesthis is my last thread
[URL]
this is my code
<li><a href="Furniture.aspx?h_name=electric">Electric</a></li>
in Furniture.aspx will show all product that have H_name=electric
i have another Item
<li><a href="Furniture.aspx?h_name=?">show all</a></li>
i want when user click in this item on jquery menu in Furniture.aspx will show all product in this item H_name is'nt important i want show all product with different H_name
We have an aspx page that displays list of html file & folders from an shared folder. The html files and folder within this shared folder is being maitained by the end users. These are the static html files. When user clicks on any of the file, our .net code open up that file in the new window.
Recently there was an change in the requirement. End user wanted to display some of the data dynamically in the HTML page. We the asked end users to replace the static/hard coded data(eg. City name) within the html files. Find below sample code for your reference
Existing code in html
[Code]....
New code in html
[Code]....
To achieve this our .net code looks for the tag values(State or City) within the lookup table in SQL DB. It then gets the value from the respective tag from DB and replaces the custom tag with the DB value
Eg: <TAG:DYNAMIC value="State"> is being replaced by the value of the State tag in DB.
In order to achieve this we parse the entire html file and then replace the dynamic tags with the DB value. The parsing happens quick in smaller html files but takes almost 10-12 secs to parse bigger files (around 255KBs). We also noticed that even though we increase the number of our custom tags within the bigger files, the code takes same time to open the parsed html file. So it looks like DB hit is not an issue and looks like the issue lies in the parsing of the files. Find below code that parses the html file
[Code]....
On further analysis we noticed the while loop within the above code takes longer to execute. Let me know if there is any better and faster way to parse bigger html files.
How I can see my folders in a list or DataGridView,and save images in the selected folder.
View 1 RepliesI'm trying to display a list of Excel files that are stored in multiple folders in adatagrid but the .GetFiles part of the routine in my loop only gets the very last excel file rather than all that meet the criteria. Below is the code I've been working on for several days. This is the first time I have tried to use a "For next loop," and I am having much trouble with this. Using the same loop code posted I was able to verify that the loop was working by appending some text into a temporary label.
[Code]....
I'm trying to allow the user to upload an image to the server (this part works) and display it on the next page (this part doesn't). I've got two files, imageuploadtext.aspx, which has the following code:
[Code]....
And the second file is imageloadtext.aspx, which has this short code:
[Code]....
As I said, the upload works fine and the file is received. But I can't get the source to display the correct image on the second page. Could it be to do with the fact the first page is VB and the second is C#? If so what code would I replace the C# with for it to work with VB? By the way, I'm currently getting a ";" expected on the image source line which I'm not sure where it goes, that might be it?
Suppose I have two page admin and home,in admin page one upload control and in home page gridview,I will select the image and upload from admin and after uploading show the image in home page gridview ...
View 1 Replieshow can i display the image at run time using file upload ? plzz give me the code .. i can write the code for image saving in the folder but they should be displayed at runtime corresponding to the id generated.
View 3 RepliesI have a FileUpload Control on a Content page of a Master Page. I need to upload an image and display it before user can upload it. Can someone advice (with example if possible) what FileUpload event will notify me that a file was selected so I can than display it? Is this the best way to perfom this task?
View 20 Repliesi want to load image into image control emmidiatly when i am uploading it by using fileupload control that means when i am uploading a file i display on the page immediately on page in image control.
View 1 RepliesHow can i upload image to a folder and its path to my database using stored procedure?
And similarly i want to retrieve images from database using their paths stored in database through stored procedure...
I am trying to upload a text file and display the content in a grid view. However, when i try to upload it,it appear this error? Oh ya, do you know the code to upload text file? If you know can u edit my code to make it take the file from fileupload instead of textbox?
The error is:
Index was outside the bounds of the array. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.
Source Error:
[Code]....
How to display image in Image control after upload on the server asp.net C#Without pressing any key OR UPLOAD BUTTON
View 1 Replies