Pages

Showing posts with label Servers Issues. Show all posts
Showing posts with label Servers Issues. Show all posts

Saturday, August 16, 2014

How To: Load SharePoint web part User Control Inside another SharePoint web part without C# Coding

simple way to Load SharePoint web part User Control Inside another  SharePoint web part without C# Coding is done by :

  1. registering the user control
    <%@ Register src="webPartUC.ascx" tagname="webPartUC" tagprefix="uc" %>

  2. loading the user control <uc:webPartUC ID="webPartUC1" runat="server" />
if you wanted to pass webpart properties.. all you have to do is to specify the values as follows:
<uc:webPartUC ID="webPartUC1" LabelText="TEXT" runat="server" />

if you wanted to pass webpart properties from within a DataList Control Items .. all you have to do is to specify the values as follows making sure to add the below line inside the DataList:

 <asp:DataList ID="usersDL" runat="server" Width="100%" >
   <ItemTemplate>
         <uc:webPartUC ID="webPartUC1"
              LabelText=<%# Eval("userName")%> runat="server" />

    </ItemTemplate>
 </asp:DataList>


Thats it :)

    

Saturday, May 17, 2014

Embed PDF in HTML Page


To Embed PDF files in HTML Page You can use below snippet of code, It works in most browser versions (Chrome, Firefox, IE,... ).

if it is not supported, it shows the message "The PDF cannot be displayed."

<div id="pdf">
<object width="900" height="1000" type="application/pdf" data="/filepath/filename.pdf?#zoom=85&scrollbar=0&toolbar=0&navpanes=0" id="pdf_content">
<p>The PDF cannot be displayed. <a href="/filepath/filename.pdf" target="_top">download</a>.</p>
</object>
</div>

Above snippet of code sets the zoom to 85%, removes scrollbars, toolbars and nav panes.

Hope it helps J

SOLVED: 'Download Unsuccessful' Error Notification in Android

Problem:
For a while, it has been an exhausting issue to fix with website users that when trying to download pdf files through the android stock browser or android chrome browser or some other browsers.. 
they get a 'Download Unsuccessful' notification.

Solution:
Now it got clear once understood that android file type association requires certain applications to open specific file types..

As long as the file type you are trying to open\download (pdf, rar, zip, word, …) is unknown or not associated with an existing application.. it won't open\download..

So all you need to do is :
·        If you want to open\download pdf file, install Acrobat Reader first through android PlayStore.
·        If you want to open\download rar, zip etc.. download and install Archidroid from android PlayStore.
·        … and so on.

Conclusion:  
At the end it's not an issue in your website you have to fix.. just file association needs to be fixed in users devices.. that's all J

Friday, January 8, 2010