Buy Questpond's video subscriptions on
huge discount
.
Online: 4172
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
ASP.NET
>
Loading ...
Validate FileUpload inside gridview once the checkbox is checked..
Posted by
Gopal_nivas
under
ASP.NET
on 2/4/2011 |
Points: 10
| Views : 3724 | Status :
[Member]
| Replies : 4
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
hi..
i want to Validate FileUpload inside gridview once the checkbox is checked..(checkbox too placed inside gridview only)
how to do this..
need ur suggestions with examples
regards
gopal.s
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Karthikanbarasan
on: 2/4/2011
[Member]
[Moderator]
[Microsoft_MVP]
[MVP]
Silver
|
Points: 25
0
Hi Gopal.
U have the file upload control inside the gridview along with a checkbox? And what validation u need to check? Can you post ur requirement brief so that we can give a solution.
Thanks
Karthik
www.f5Debug.net
Gopal_nivas
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Gopal_nivas
on: 2/4/2011
[Member]
Starter
|
Points: 25
0
hi karthik,
if i checked the checkbox for particular row ,in tat i am having fileupload control,then tat ro file upload control cannot be empty .so how to validate tat..(it is applicable for n no. of rows)
unchecked checkbox rows file upload control will be 0. and it is inserted into db as 0.
but if i checked the checkbox i have to give the files in file upload control
regards
gopal.s
Gopal_nivas
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Karthikanbarasan
on: 2/4/2011
[Member]
[Moderator]
[Microsoft_MVP]
[MVP]
Silver
|
Points: 25
0
Hi,
You can try this
[code]
protected void gridView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = gridView.Rows[e.RowIndex];
FileUpload fileUpload = row.Cells[0].FindControl("fileUpload1") as FileUpload;
if (fileUpload != null && fileUpload.HasFile)
{
//Insert the file here
}
else
{
Check if the Checkbox is checked or not here and insert as 0
}
}
[\code]
Thanks
Karthik
www.f5Debug.net
Gopal_nivas
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Gopal_nivas
on: 2/28/2011
[Member]
Starter
|
Points: 25
0
hi karthik..
thanks for ur coding..
is it possible to do this using java script..
if possible means give me some example for that..
need ur suggestions
regards
gopal.s
Gopal_nivas
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...