5 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 11 Jul 2012, 01:56 PM
Hi mohamed,
I suppose that you want to access the FileUpload control inside the RadPageView. Here is the sample code that I tried.
ASPX:
C#:
Thanks,
Princy.
I suppose that you want to access the FileUpload control inside the RadPageView. Here is the sample code that I tried.
ASPX:
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
>
<
telerik:RadPageView
ID
=
"RadPageView1"
runat
=
"server"
>
<
asp:FileUpload
ID
=
"FileUpload1"
runat
=
"server"
/>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
OnClick
=
"Button1_Click"
/>
C#:
protected
void
Button1_Click(
object
sender, EventArgs e)
{
FileUpload FileUpload1 = (FileUpload)RadPageView1.FindControl(
"FileUpload1"
);
string
file = FileUpload1.PostedFile.ToString(); ;
}
Thanks,
Princy.
0
New
Top achievements
Rank 1
answered on 12 Jul 2012, 04:12 AM
Thanks For Ur reply Princy,
Object Reference Error Comes
Thanks Advance,
Mohamed
Object Reference Error Comes
Thanks Advance,
Mohamed
0
mohamed
Top achievements
Rank 1
answered on 12 Jul 2012, 04:28 AM
Thanks For Reply Princy,
My Design Page Code ,
I'm getting filename like that but here the postedfile is come null,
string Filepah = FileUp.PostedFile.FileName;
Thanks Advance,
Mohideen.
<
telerik:RadPageView
runat
=
"server"
ID
=
"PageView8"
>
<
div
class
=
"multipageHeight"
>
<
table
cellpadding
=
"0"
cellspacing
=
"0"
class
=
"tblspacer"
>
<
tr
>
<
td
class
=
"hdpLabel"
colspan
=
"2"
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
align
=
"right"
>
<
asp:Label
ID
=
"Label8"
Text
=
"Import :"
runat
=
"server"
></
asp:Label
>
</
td
>
<
td
valign
=
"top"
>
<
asp:FileUpload
runat
=
"server"
ID
=
"FileUp"
/>
<
asp:Button
runat
=
"server"
ID
=
"Import"
Text
=
"Import"
OnClick
=
"Import_Click"
/>
</
td
>
</
tr
>
I'm getting filename like that but here the postedfile is come null,
string Filepah = FileUp.PostedFile.FileName;
Thanks Advance,
Mohideen.
0
Princy
Top achievements
Rank 2
answered on 13 Jul 2012, 05:47 AM
Hi Mohamed,
Unfortunately I couldn't replicate your issue at my end. The code is working fine in telerik version 2012, 1, 215, 35.
ASPX:
C#:
Attached is the screenshot.
Regards,
Princy.
Unfortunately I couldn't replicate your issue at my end. The code is working fine in telerik version 2012, 1, 215, 35.
ASPX:
<
telerik:RadPageView
ID
=
"RadPageView1"
runat
=
"server"
Selected
=
"true"
>
<
div
class
=
"multipageHeight"
>
<
table
cellpadding
=
"0"
cellspacing
=
"0"
class
=
"tblspacer"
>
<
tr
>
<
td
class
=
"hdpLabel"
colspan
=
"2"
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
align
=
"right"
>
<
asp:Label
ID
=
"Label8"
Text
=
"Import :"
runat
=
"server"
></
asp:Label
>
</
td
>
<
td
valign
=
"top"
>
<
asp:FileUpload
runat
=
"server"
ID
=
"FileUp"
/>
<
asp:Button
runat
=
"server"
ID
=
"Import"
Text
=
"Import"
OnClick
=
"Import_Click"
/>
</
td
>
</
tr
>
</
table
>
</
div
>
</
telerik:RadPageView
>
C#:
protected
void
Import_Click(
object
sender, EventArgs e)
{
FileUpload FileUpload1 = (FileUpload)RadPageView1.FindControl(
"FileUp"
);
HttpPostedFile s = FileUpload1.PostedFile;
}
Attached is the screenshot.
Regards,
Princy.
0
mohamed
Top achievements
Rank 1
answered on 13 Jul 2012, 06:12 AM
that the problem ajax:settings ,
Problem Solved
Thanks Advance,
Mohamed.