Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
364 views

Hi guys,

One of the options of the RadEditor is an option to create links using UI (see the attached screenshot RedEditorVulnerability.jpg)

Here is an option to open a new tab when clicking this link on a front-end site.

What I've recently found is this article with an example https://dev.to/ben/the-targetblank-vulnerability-by-example which says that using the "target=_blank" is a potential security hole for any site in any browser for now. Also there are some suggestions regarding on how to prevent this (by adding the rel="noopener noreferrer" attribute to a link).

So I'd like to ask you to add a possibility in the Hyperlink Manager to secure such links (e.g. some kind of checkbox "Protect my link from the target=_blank vulnerability").

This functionality will be very helpful for those clients who are focused on their sites' security.

Thank you!

 

Ianko
Telerik team
 answered on 13 Sep 2016
15 answers
192 views

When the root (1st) node in a RadTreeView are expanded, the background of the child nodes have black vertical lines behind them. (See screenshot attached).

What can I do about this or is this a bug?

 Thank you,

Lee

Ivan Danchev
Telerik team
 answered on 13 Sep 2016
1 answer
373 views
Hi i have the two way binding working with rad grid and a rad combobox in a template but when i hit  save the new changed data is not being passed. i keep getting the old bound data. here is the code.                           
                                       
    protected void OnClickSave(object sender, EventArgs e)
        {
            foreach (var test in grdStatus.Items)
            {
              GridEditableItem item = (GridEditableItem)test;
               QARSubmittal s = item.DataItem as QARSubmittal;
                RadComboBox comboBox = item.FindControl("CbOracleVerified") as RadComboBox;

               string format = DataBinder.Eval(item.DataItem, "ORACLE_VERIFIED").ToString(); 

            }

        }
    private void LoadResults()
        {
            var dtosList = new List<QARSubmittal>();
            int counter = 3;
            for (int i = 0; i < counter; i++)
            {
                var dtos = new QARSubmittal
                {

                    AUDIT_CALENDAR_ID = 11000+i,
                    SUBMITTER_USERID = 1000 + i,
                    RC = 999 + i,
                    STATION = "Atlanta" + i,              
                    ORACLE_VERIFIED = i==1?0:1,
                    TRAFFIC_VERIFIED = 1,
                    DART_VERIFIED = 1,
                    OPERATIVE_VERIFIED = 1,
                    CBSPAYNOW_VERIFIED = 1,
                    ANDO_TRITON_VERIFIED = 1,
                    SUBMITTAL_STATUS = 1000,
                    SUBMITTER = "gabdo" + i,
                    SUBMIT_DATE = DateTime.Today,
                    MARKET = "Atlanta" + i

                };
                dtosList.Add(dtos);
            }

            grdStatus.DataSource = dtosList;
            grdStatus.Rebind();

        }


here is my html 
                                       
             <telerik:RadGrid runat="server" ID="grdStatus" OnItemCommand="grdStatus_ItemCommand"   AutoGenerateColumns="false"  AllowPaging="false" >
                   <MasterTableView DataKeyNames="QAR_SUBMITTAL_ID,AUDIT_CALENDAR_ID,SUBMITTER_USERID,RC, MARKET, STATION, ORACLE_VERIFIED, TRAFFIC_VERIFIED,
                ANDO_TRITON_VERIFIED,DART_VERIFIED,OPERATIVE_VERIFIED,CBSPAYNOW_VERIFIED,SUBMITTER">
                   <Columns>
                    
                         <telerik:GridTemplateColumn UniqueName="ORACLE_VERIFIED" HeaderText="Oracle">
                        <ItemTemplate>
                                <telerik:RadComboBox runat="server" SelectedValue='<%#Bind("ORACLE_VERIFIED") %>' AutoPostBack="false" ID="CbOracleVerified">
                                <Items>
                                    <telerik:RadComboBoxItem Text="Not Verified" Value="0" />
                                     <telerik:RadComboBoxItem Text="N/A" Value="-1" />
                                     <telerik:RadComboBoxItem Text="Verified" Value="1" />
                                     
                                </Items>
                      </telerik:RadComboBox>
                         
                   </Columns>
                       </MasterTableView>
             </telerik:RadGrid>

     <div class="dialogHeader">
        <table border="0">
            <tr>
                <td align="left" valign="top">
                    <table cellspacing="5">
                        <tr>
                            <td>
                                <telerik:RadButton runat="server" ID="btnSave" OnClick="OnClickSave" Text="Save" Style="margin-bottom: 0px">
                                </telerik:RadButton>
                            </td>
                            <td>
                                <telerik:RadButton runat="server" ID="btnSubmit" OnClick="OnClickSubmit" Text="Submit">
                                </telerik:RadButton>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
Veselin Tsvetanov
Telerik team
 answered on 13 Sep 2016
8 answers
129 views

When enabling AutoResizeHeight on Radeditor with Material skin the attached appears in PREVIEW mode.

 

Marc

Vessy
Telerik team
 answered on 13 Sep 2016
1 answer
727 views

I have rad controls in my page, those are working fine in my visual studio development.

But when i access it after deployed in IIS, none of the controls seems to work.

And the page remains same as without interaction, except the bookmark tag created in the URL '#'.

 

I went through some of the articles in telerik site, but nothing helped me.

Here's my web.config : 

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  -->
<configuration>
   
  <system.web>
    <httpHandlers>
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
 
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2015.2.729.45 , Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />
       
       
      <!--<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>-->
 
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
    </httpHandlers>
    <compilation targetFramework="4.5">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
        <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      </assemblies>
      <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
      </buildProviders>
    </compilation>
     
    <httpRuntime targetFramework="4.5" />
    <authentication mode="Windows" />
    <identity impersonate="true" />
    <authorization>
      <deny users="?" />
    </authorization>
   
    <pages>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>
   
  </system.web>
  <location path="Report">
    <system.webServer>
      <security>
        <authentication>
          <windowsAuthentication enabled="true" />
        </authentication>
      </security>
    </system.webServer>
  </location>
  <location path="Users/Telerik.Web.UI.WebResource.axd">
<system.web>
    <authorization>
        <allow users="*" />
    </authorization>
</system.web>
</location>
 
<location path="Telerik.Web.UI.WebResource.axd">
<system.web>
    <authorization>
        <allow users="*" />
    </authorization>
</system.web>
</location>
 
 
 
   
   
   
   
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
       
    </modules>
      <handlers>
 
 
 
       
         
         
         
         
         
      <remove name="ChartImage_axd" />
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
      <remove name="Telerik_Web_UI_DialogHandler_aspx" />
      <remove name="Telerik_RadUploadProgressHandler_ashx" />
      <remove name="Telerik_Web_UI_WebResource_axd" />
 
 
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />  
        <!--<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2015.2.729.45 , Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>-->
      
        <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    </handlers>
  </system.webServer>
  <appSettings>
  <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />
  <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" /> 
  </appSettings>
</configuration>

Marin Bratanov
Telerik team
 answered on 13 Sep 2016
1 answer
202 views

Hi Admin,

 

  I have tried to load an excel file using RADSpreadSheet, and it was successfully loaded. And now I am trying to open an excel macro file. Can help me to figure out how to load a macro file?

 

  Thank you.

Veselin Tsvetanov
Telerik team
 answered on 13 Sep 2016
1 answer
2.1K+ views
Dear All,

I have the following code to generate QR Code dynamically:

public Image GetQRCode(string sUrl, int iDotSize)
{
    var code = new RadBarcode();
    code.Text = sUrl;
    code.Type = BarcodeType.QRCode;
    code.OutputType = BarcodeOutputType.EmbeddedPNG;
    code.QRCodeSettings.Mode = Telerik.Web.UI.Barcode.Modes.CodeMode.Byte;
    code.QRCodeSettings.ErrorCorrectionLevel = Telerik.Web.UI.Barcode.Modes.ErrorCorrectionLevel.L;
    code.QRCodeSettings.DotSize = iDotSize;
    code.QRCodeSettings.Version = 2;
    code.QRCodeSettings.ECI = Telerik.Web.UI.Barcode.Modes.ECIMode.None;
 
    //code.QRCodeSettings.DotSize = 0; // no changes, space is always there
    //code.Attributes.Add("Width", "310px"); // no changes, space is always there
    //code.Attributes.Add("Height", "310px"); // no changes, space is always there
    return code.GetImage();
}


Can any one tell me how to purge padding space between the image border and QRCode symbol?
According to the documentation changing DotSize to zero should resize the QR symbol to fill up the Width and Height.
It doesn't work, the white space is always there. I tried also several other setting without success.
Greatly appreciate for any helps.


Regards,
Christopher
kzimny
Top achievements
Rank 1
 answered on 13 Sep 2016
1 answer
98 views

Hello,

is it possible to somehow show the earliest possible start and latest possible end for a task as the background of the task?

I tried to use the task-template but it is not possible at this point to add a background wider than the task it self. Also it would move when the task is moved.

best regards

 

Thorsten Hacke

Veselin Tsvetanov
Telerik team
 answered on 13 Sep 2016
6 answers
2.7K+ views

 

In the ItemDataBound event we are no longer to retrieve the Item value using the following code and are getting the value of '&nbsp;'

 

If TypeOf e.Item Is GridDataItem Then
  
 Dim dataItem As GridDataItem = DirectCast(e.Item, GridDataItem)
 
 Dim EAFID As String = NoNull(dataItem("row_ID").toString)

This seems to be after a recent update of telerik versions as we were getting valid values.

Any help or clues on why this method of access is not working?
Josef Rogovsky
Top achievements
Rank 2
 answered on 13 Sep 2016
3 answers
166 views

We just upgraded our web server from Windows Server 2003 R2 with IIS 6.?  to Windows Server 2012 R2 with IIS 8.5.9600.

We also upgraded the Telerik controls from 2010.3.1317.35 to 2016.2.607.35.

A very simplified page example is:

<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="hfToolId" runat="server" />
    <asp:HiddenField ID="hfTempDirectory" runat="server" />
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true">
    </telerik:RadScriptManager>
    <asp:Button ID="Button1" runat="server" Text="Button" />
    <div>
        <telerik:RadFileExplorer ID="rfeDocs" runat="server" OnClientFileOpen="OnClientFileOpen"
            DisplayUpFolderItem="false" EnableCreateNewFolder="false" Width="100%">
            <Configuration SearchPatterns="*.*" MaxUploadFileSize="104857600" />
        </telerik:RadFileExplorer>
    </div>
    </form>
</body>

 

Its associated code behind is:

01.Partial Class _Default
02.    Inherits System.Web.UI.Page
03. 
04.    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
05.        SetupFileExplorer()
06.    End Sub
07. 
08.    Private Sub SetupFileExplorer()
09.        Dim controls As Telerik.Web.UI.FileExplorer.FileExplorerControls = 0
10.        Dim di As IO.DirectoryInfo
11.        Dim newTempDirectory As String = String.Empty
12.        Dim path(0) As String
13.        Dim s = CType(rfeDocs.FindControl("splitter"), RadSplitter)
14.        Dim toolId As Integer
15. 
16.        If IsNumeric(hfToolId.Value) Then
17.            toolId = CInt(hfToolId.Value)
18.        ElseIf Request.QueryString("equipmentid") IsNot Nothing Then
19.            toolId = CInt(Request.QueryString("equipmentid"))
20.        Else
21.            toolId = 0
22.        End If
23. 
24.        For Each item As RadToolBarItem In rfeDocs.ToolBar.Items
25.            If TypeOf item Is RadToolBarButton Then
26.                CType(item, RadToolBarButton).CausesValidation = False
27.            End If
28.        Next
29. 
30.        If toolId > 0 Then
31.            path(0) = Page.ResolveUrl("~/Tools/" & toolId.ToString())
32.        ElseIf Not String.IsNullOrEmpty(hfTempDirectory.Value) Then
33.            path(0) = Page.ResolveUrl("~/Tools/" & hfTempDirectory.Value)
34.        Else
35.            newTempDirectory = Request.LogonUserIdentity.Name().Split(New Char() {"\"c})(1) & Now.Ticks
36.            hfTempDirectory.Value = newTempDirectory
37.            path(0) = Page.ResolveUrl("~/Tools/" & newTempDirectory)
38.        End If
39. 
40. 
41.        di = New IO.DirectoryInfo(Server.MapPath(path(0)))
42. 
43.        If Not di.Exists Then
44.            di.Create()
45.        End If
46. 
47.        rfeDocs.Configuration.ViewPaths = path
48.        rfeDocs.Configuration.UploadPaths = path
49.        rfeDocs.Configuration.DeletePaths = path
50. 
51.        rfeDocs.Upload.InitialFileInputsCount = 1
52.        rfeDocs.InitialPath = path(0)
53.        rfeDocs.Upload.EnableFileInputSkinning = False
54.        rfeDocs.Grid.MasterTableView.TableLayout = GridTableLayout.Fixed
55.        rfeDocs.Grid.ClientSettings.AllowRowsDragDrop = False
56.        rfeDocs.Grid.ClientSettings.Resizing.ResizeGridOnColumnResize = True
57.        rfeDocs.VisibleControls = FileExplorer.FileExplorerControls.Toolbar Or FileExplorer.FileExplorerControls.Grid
58. 
59.    End Sub
60. 
61.    Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
62.        'just to force page postback
63.    End Sub
64.End Class

 

The user would normally fill out a form, click a save button (which would cause the postback), then upload files via the RadFileExplorer control.  Prior to the server upgrades, the code worked fine, after the upgrades, the page fails on line 51 in the code behind.  The rfeDocs.Upload object/property is null/nothing.

Is there anything incorrect with the page for the new version?

 

Thank you,

James

Vessy
Telerik team
 answered on 12 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?