16,020,877 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 10954869 (Top 9 by date)
Member 10954869
20-Aug-14 3:32am
View
i got inner exception is null why and what the problem
Member 10954869
14-Aug-14 7:10am
View
try this and give solution for me after browse the file in fileupload control that Upload Button is not showing
Member 10954869
14-Aug-14 7:09am
View
my aspx code
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
.fileupload
{
margin: auto;
line-height: 50;
position: static;
width: 100px;
height: 100px;
}
.button
{
margin-top: 10px;
}
.btn
{
display: block;
}
</style>
<script type="text/javascript">
function ValidateUpload()
{
$(document).ready(
function(){
$('#FileUpLoad1').change(
function(){
if ($(this).val()) {
$('#btnUpLoad').attr('disabled',false);
}
}
);
});
}
// function ValidateUpload() {
// var uploadcontrol = document.getElementById('<%=FileUpLoad1.ClientID%>').value;
// if (uploadcontrol.length > 0) {
// document.getElementById("<%=btnUpLoad.ClientID%>" ).style.display = 0
// alert("uyffsd");
// }
// else {
// return false;
// }
// return true;
}
function uploadAlert() {
var uploadcontrol = document.getElementById('<%=FileUpLoad1.ClientID%>').value;
//Regular Expression for fileupload control.
var Extension = uploadcontrol.substring(uploadcontrol.lastIndexOf('.') + 1).toLowerCase();
if (uploadcontrol.length > 0) {
//Checks with the control value.
if (Extension == "txt" || Extension == "csv") {
alert("File Uploaded Succesfully");
return true;
}
else {
//If the condition not satisfied shows error message.
alert("Only .txt, .csv files are allowed!");
return false;
}
}
else {
alert("Please Select File");
}
}
</script>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:UpdatePanel ID="upnlUserMgmt" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="btnUpLoad" />
</Triggers>
<contenttemplate>
<span>Create Bulk User</span>
<div align="center" class="fileupload">
<asp:FileUpload ID="FileUpLoad1" runat="server" ToolTip="Select a File" />
<div align="center">
<asp:Button ID="btnUpLoad" Text="UploadFile" OnClick="btnUpLoad_Click" OnClientClick="return uploadAlert();"
runat="server" Width="105px" CssClass="btn btn-info button" Visible="false"/>
<asp:RequiredFieldValidator ID="CustomValidator1" runat="server" ControlToValidate="FileUpLoad1"
ClientValidationFunction="return ValidateUpload();" ErrorMessage="Required File">
</div>
<asp:Label ID="lblresult" runat="server">
</div>
Member 10954869
14-Aug-14 7:08am
View
already done that modificatins not working
Member 10954869
14-Aug-14 6:22am
View
working there but not working oin asp.net
Member 10954869
14-Aug-14 5:38am
View
not workng
Member 10954869
12-Aug-14 8:57am
View
i used mappath with current folder but that is not working
Member 10954869
12-Aug-14 8:53am
View
i have requirement without storing into database
Member 10954869
12-Aug-14 8:45am
View
i have one register page when i click register all details saved in the database table,
i have another page in that one uploadfile control upload button,when i click upload button i want save that file in application folder delete after completion of operation and create users button
in that csv file contains all details what i want seperated by comma
iam upload csv files only if i upload file and when i click create users i want register all in database,my doubt is how can i upload file and how can i use that file
Show More