15,906,625 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 Javascript questions
View Visual Basic questions
View Python 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 sajad379 (Top 13 by date)
sajad379
29-May-14 4:26am
View
at there any body can't create comment box?!!!
sajad379
28-May-14 9:41am
View
I dont want use SignalR Prasad Avunoori...
sajad379
28-May-14 8:24am
View
Deleted
Prasad Avunoori ,whats SignalR ?!!
sajad379
28-May-14 8:23am
View
I improved my Question
sajad379
27-May-14 3:13am
View
my problem solved!
thanks
sajad379
12-May-14 16:21pm
View
please help!
sajad379
11-May-14 9:55am
View
sorry but by this code anything not show in outpute...<br>
sajad379
11-May-14 8:40am
View
How I do it?please give me example like Solution 3...tnx
sajad379
11-May-14 7:02am
View
I have error message in this line:
visible="<%# !String.IsNullOrEmpty(Eval("image4"))%>"
-------
Compilation Error
Compiler Error Message: CS1502: The best overloaded method match for 'string.IsNullOrEmpty(string)' has some invalid arguments
-------
and in asp error list:
error1:Argument 1: cannot convert from 'object' to 'string'
error2:The best overloaded method match for 'string.IsNullOrEmpty(string)' has some invalid arguments
sajad379
10-May-14 18:19pm
View
sankarsan parida11, this is not solution.<br><br>
I only want datalist don't display anything if image file path is null in the db.<br>
please help...
sajad379
10-May-14 10:45am
View
in file upload section:
protected void Button1_Click(object sender, EventArgs e)
{
if(!string.IsNullOrEmpty(FileUpload2.FileName))
{
FileUpload2.SaveAs("" + Server.MapPath("..//") + "\\images/htcpic/\\" + FileUpload2.FileName);
}
if(!string.IsNullOrEmpty(FileUpload3.FileName))
{
FileUpload3.SaveAs("" + Server.MapPath("..//") + "\\images/htcpic/\\" + FileUpload3.FileName);
}
if (!string.IsNullOrEmpty(FileUpload4.FileName))
{
FileUpload4.SaveAs("" + Server.MapPath("..//") + "\\images/htcpic/\\" + FileUpload4.FileName);
}
string sajad = "Data Source=.;Initial Catalog=minus;Integrated Security=True";
SqlConnection conn = new SqlConnection(sajad);
SqlCommand sd = new SqlCommand("insert into mspc(title,image2,image3,image4) values (@title,@image2,@image3,@image4)", conn);
sd.Parameters.AddWithValue("@image", FileUpload1.FileName);
sd.Parameters.AddWithValue("@image2", FileUpload2.FileName);
sd.Parameters.AddWithValue("@image3", FileUpload3.FileName);
sd.Parameters.AddWithValue("@image4", FileUpload4.FileName);
sd.Parameters.AddWithValue("@title", TextBox1.Text);
conn.Open();
sd.ExecuteNonQuery();
conn.Close(); }
}
----------------------
in datalist:
<asp:DataList ID="DataList2" runat="server" DataKeyField="id" DataSourceID="SqlDataSource1" RepeatDirection="Horizontal">
<itemtemplate>
<br />
<img alt='<%# Eval("title") %>' height="178" src='/images/htcpic/<%#Eval("image2") %>' style="border-right: #cccccc thin solid; border-top: #cccccc thin solid; border-left: #cccccc thin solid; border-bottom: #cccccc thin solid"
width="120" />
<img alt='<%# Eval("title") %>' height="178" src='/images/htcpic/<%#Eval("image3") %>' style="border-right: #cccccc thin solid; border-top: #cccccc thin solid; border-left: #cccccc thin solid; border-bottom: #cccccc thin solid"
width="120" />
<img alt='<%# Eval("title") %>' height="178" src='/images/htcpic/<%#Eval("image4") %>' style="border-right: #cccccc thin solid; border-top: #cccccc thin solid; border-left: #cccccc thin solid; border-bottom: #cccccc thin solid"
width="120" />
sajad379
8-May-14 5:08am
View
I don't use RequiredFieldValidator in fileupload and in my database FileUpload2 field NULL allowed.i want when i don't use second file upload control,any thing not add in my database,and not show any error
sajad379
8-May-14 4:58am
View
pic uploaded in in folder and path image stored in database
Show More