Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
80 views
Hi,

I need to use RadAsyncUpload to upload the files and then save the file into database in code-behind. Everything works fine except the "InputStream" throws a file not found exception. I looked at the folder where the files are uploaded. Originally, the file name contains a series of number then the actual file name. After post, the file got renamed back to the actual file name! That's why the UploadedFile.InputStream cannot find the file. If the file is renamed, the input stream should look for the file with the renamed file name.

I can go around this problem of course, but I think you guys should fix this issue. (I have the latest version of Telerik library.) By the way, I can't use the "OnFileUploaded" event because I need to create my own object first. Then, these files are the attachments of my object.

If you want to see some code:
.aspx:
<telerik:RadAsyncUpload runat="server" ID="rauAttachment" HideFileInput="true" MultipleFileSelection="Automatic" TargetFolder="~/UserFiles/Temp/" Localization-Select="Attach Files" Width="88" OnClientValidationFailed="RauValidationFailed" />

.aspx.cs: Submit button click event:
Stream stm = rauAttachment.UploadedFiles[0].InputStream; //File not found exception occurs.

Regards,

Roger
Roger
Top achievements
Rank 1
 answered on 21 Feb 2013
8 answers
170 views
Hi All!

I am trying to insert/delete RibbonBarMenuItems in RibbonBarMenu using Javascript clientside.
I cannot find any documentation on how this is done.

I have tried doing it the same as it is done in RadMenu:
    menu.trackChanges();
    menu.get_items().add(item);
    menu.commitChanges();
but this attempt was unsuccessful.

Any help will be much appreciated.
Thanks in advance!!
PieterDevill
Kate
Telerik team
 answered on 21 Feb 2013
1 answer
417 views

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

Plamen
Telerik team
 answered on 21 Feb 2013
1 answer
298 views
Hi,

I've implemented a load-on-demand radtabstrip with radmultipage using the telerik demo. This works fine. Each tab shows an ascx control which holds a different Radgrid.
I then tried to implement the RenderSelectedPageOnly by setting this to "true" & setting AutoPostBack to "true" on the TabStrip.
However, this did not work. When i load my page, the default tab loads & when i click on to another tab then this loads correctly.
BUT if i click back on to a tab i already viewed, it displays a blank tab with no radgrid. I tried to trace the AutoPostBack but it does not seem to be firing.
All i want to do is render the selected page of the TabStrip but when another tab is selected (regardless of whether it has been rendered before) load the newly clicked Tabs page contents.
My code is as follows:

HTML:
<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>


JAVASCRIPT:
function onTabSelecting(sender, args) {
    if (args.get_tab().get_pageViewID()) {
        args.get_tab().set_postBack(false);
    }
}

.CS
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);
}

Can anyone tell me what i'm doing wrong or why the autopostback is not firing when a viewed tab is selected again?
Is there a different way of getting the TabStrip to render selected page only but reload a different tab when clicked on?

Regards,

Shuja



Nencho
Telerik team
 answered on 21 Feb 2013
5 answers
78 views
Hello

We are using Telerik V2010 - Q1.  It seems that there is an issue with using RadToolTipManager with RadGrid and RadAjaxManagerProxy in that the tooltip shows up but almost immediately disappears.  Could someone please suggest a fix if there is any?  We need to use the RadAjaxManagerProxy.

Thank you
Raka
Marin Bratanov
Telerik team
 answered on 21 Feb 2013
1 answer
61 views
Hi All,

I am new to this Telerik world, i need some help with a task, when a aspx webform is closed, it should invoke a code behind method and i need to do some cleanup of some custom objects. Heard from my techinical lead that i shud be using RAD control to do it but never worked on it. Any help is appreciated and code samples will help..

Thanks,
Srinivas.
Rumen
Telerik team
 answered on 21 Feb 2013
3 answers
206 views
Hi,

  I have a RadProgressManager and RadProgressArea on my ASPX Page which opens in a RadWindow.
<telerik:RadProgressManager id="Radprogressmanager1" runat="server" RegisterForSubmit="false" />            
                    <telerik:RadProgressArea id="RadProgressArea1" runat="server" /> 

We try to copy data from one table to another table when that copy is occuring the Progressmanager kicks in ans shows how much percent of copying is done. 

After the copying is started it, progress bar is getting stuck in certain point and giving the attached error message.
 RadUploadAjax callback error : Source url returned error : 12002.

I don't know why it is behaving like this.

I registered it correctly in web.config. Don't what is triggering this issue.

Any help would be appreciated.

Thanks,
Nirmala Kalakonda


 
  


Suthish
Top achievements
Rank 2
 answered on 21 Feb 2013
4 answers
466 views
I have a test page with nothing more than an AsyncUpload control. I created a folder within the web site called "files".
I set the path within the control to save files into this folder on postback. I added a button to accomplish postback.

I am getting an ASP.Net error: 

[start error]

Access to the path is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

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.

Stack Trace:

[UnauthorizedAccessException: Access to the path is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9717727
   System.IO.__Error.WinIOError() +33
   System.IO.File.Move(String sourceFileName, String destFileName) +258
   Telerik.Web.UI.AsyncUploadedFile.SaveAs(String fileName, Boolean overwrite) +50
   Telerik.Web.UI.RadAsyncUpload.RaisePostDataChangedEvent() +299
   Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +10
   System.Web.UI.Page.RaiseChangedEvents() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5201
[end error]

I've tried to to change the "files" folder permissions to "Everyone" and great full permissions but it still fails.

Does anyone have any suggestions?

Thanks,
Joe

[Update]

I solved the issue by adding this line to the web.config

<identity impersonate="true" />

So my question is this? Is that a real security risk by doing so???
Suthish
Top achievements
Rank 2
 answered on 21 Feb 2013
1 answer
85 views
I have a checkbox in edititemtemplate. How to make the parent row selected on checking the checkbox?
Shinu
Top achievements
Rank 2
 answered on 21 Feb 2013
2 answers
96 views
Hi,
I have a doubt, to pass values ​​between asp.net web pages better to use session or querystring redirect? The site may also have a lot of people online at the same time
Fabio Cirillo
Top achievements
Rank 1
 answered on 21 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?