or
How can I validate that the file I have uploaded has right mime type if compared with the file extension?
I want to support all browsers. It means well that I must do the validation on the server. Or?
And how should I do?
Right now I use RadUpload and validates against the file extensions, it works well. But like I say I also want to make sure that the file extension matches the mine type.
Grateful for the tips!
Best regards,
Foppa

<telerik:RadTabStrip OnClientTabSelecting="onTabSelecting" ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" OnTabClick="RadTabStrip1_TabClick" Width="900px" AutoPostBack="true" ></telerik:RadTabStrip><telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" Width="900px" RenderSelectedPageOnly="true" ></telerik:RadMultiPage>function onTabSelecting(sender, args) { if (args.get_tab().get_pageViewID()) { args.get_tab().set_postBack(false); }}protected void Page_Load(object sender, EventArgs e){ if (!Page.IsPostBack) { AddTab("MyForms"); AddPageView(RadTabStrip1.FindTabByText("MyForms")); AddTab("MyApprovals"); AddTab("MySystemsApprovals"); AddTab("MyGateKeeperApprovals"); }}private void AddTab(string tabName){ RadTab tab = new RadTab(); tab.Text = tabName; RadTabStrip1.Tabs.Add(tab);}private void AddPageView(RadTab tab){ RadPageView pageView = new RadPageView(); pageView.ID = tab.Text; RadMultiPage1.PageViews.Add(pageView); pageView.CssClass = "pageView"; tab.PageViewID = pageView.ID;}protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e){ AddPageView(e.Tab); e.Tab.PageView.Selected = true;}protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e){ string userControlName = e.PageView.ID + "CS.ascx"; Control userControl = Page.LoadControl(userControlName); userControl.ID = e.PageView.ID + "_userControl"; e.PageView.Controls.Add(userControl);}

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
|