You must Sign In to post a response.
  • Category: [Competition Entries]

    How to Add Source Code in Resource

    Hi Everybody,

    I want to post a resource but when i enter my source code and then when i try to view that it's displaying improperly...
    for this i'm using "CODE" tags for this also i'm facing same problem how to overcome this issuee.

    Thanks in Advacne...
  • #718207
    Remove any HTMl tags if at all you are using.

    instead encrypt the code first using the HTML encoder and then paste that in the article so that Browser will render the code portion automatically.

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #718214
    Hi,

    This is my source Code can you please tell me how to do...?

    HTML encoder i never use...

    Source Code:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Resource1.aspx.cs"
    Inherits="DMS_Resource1" Title="Resource" MasterPageFile=""%>

    <%@ Register Src="../CommonControls/MsgBox.ascx" TagName="MsgBox" TagPrefix="uc1" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderMain" runat="Server">
    <link href="../STYLES/LNTStyle.css" rel="stylesheet" type="text/css" />
    <uc1:MsgBox ID="Msgbox1" runat="server" />
    <table cellpadding="2" cellspacing="2" width="100%" align="center" border="0">
    <tr>
    <td align="right" valign="top" style="width: 30%; height: 5%">
    <table width="28%" height="100%">
    <tr valign="middle" style="height: 25%" align="right">
    <td style="height: 21%">
    <table border="1" cellpadding="0" cellspacing="0" class="TextVerdanaNavy8" width="100%">
    <tr>
    <td colspan="2" align="center">
    Legend
    </td>
    </tr>
    <tr>
    <td class="tit" align="left" width="70%">
    Drawings Uploaded
    </td>
    <td align="right" style="background-color:PaleGreen ">

    </td>
    </tr>
    <tr>
    <td class="tit" align="left" width="70%">
    Advanced Drawings
    </td>
    <td align="right" style="background-color:Gainsboro ">

    </td>
    </tr>
    <tr>
    <td class="tit" align="left" width="70%">
    Pending for Drawing Upload
    </td>
    <td align="right" style="background-color: LightYellow">

    </td>
    </tr>
    <tr>
    <td class="tit" align="left" width="70%">
    Pending for Drawing upload After 15 day's
    </td>
    <td align="right" style="background-color:LightSalmon ">

    </td>
    </tr>

    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>

    <table cellpadding="2" cellspacing="2" width="100%" align="center" border="0">
    <tr>
    <td align="center" width="100%" valign="top">
    <asp:DataGrid ID="gdDocument" runat="server" AutoGenerateColumns="False" BorderColor="Black"
    BorderStyle="Solid" BorderWidth="1px" CellPadding="2" CssClass="ArialNarrow"
    GridLines="Vertical" Width="100%"
    OnItemDataBound="gdDocument_ItemDataBound" AllowPaging="True"
    onpageindexchanged="gdDocument_PageIndexChanged" PageSize="50" >

    <PagerStyle HorizontalAlign="center" Mode="NumericPages"
    PageButtonCount="10" />
    <SelectedItemStyle BackColor="White" ForeColor="White" />
    <AlternatingItemStyle BackColor="AliceBlue" HorizontalAlign="Left" />
    <ItemStyle BackColor="White" ForeColor="Black" HorizontalAlign="Left" VerticalAlign="Top" />
    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" BackColor="#000084" ForeColor="White"
    Font-Bold="True" />
    <Columns>

    <asp:TemplateColumn HeaderText="Drg/Doc No." ItemStyle-Wrap="false">
    <ItemTemplate>

    <asp:Label ID="lblDwg_No" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Doc_No") %>'></asp:Label>
    <asp:Label ID="lblDrawing" Visible="false" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Doc_Id") %>'></asp:Label>
    </ItemTemplate>

    <ItemStyle Wrap="False"></ItemStyle>
    </asp:TemplateColumn>

    <asp:TemplateColumn HeaderText="Functional Unit">
    <ItemTemplate>
    <asp:Label ID="lblFunctional_Unit" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "FunctionalUnit") %>'></asp:Label>
    </ItemTemplate>
    </asp:TemplateColumn>
    <asp:TemplateColumn HeaderText="Title/Description">
    <ItemTemplate>

    <asp:Label ID="lblTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Title") %>'></asp:Label>
    </ItemTemplate>
    </asp:TemplateColumn>
    <asp:TemplateColumn HeaderText="Revision No">
    <ItemTemplate>
    <asp:Label ID="lblApproval" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Approval_Date","{0:dd-MMM-yyyy}") %>' Visible="false"></asp:Label>
    <asp:Label ID="lblRev" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Dwg_Rev_No") %>'></asp:Label>
    </ItemTemplate>
    </asp:TemplateColumn>

    <asp:TemplateColumn HeaderText="Size">
    <ItemTemplate>
    <asp:Label ID="lblSize" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Dwg_Size_Desc") %>'></asp:Label>
    </ItemTemplate>
    <ItemStyle HorizontalAlign="Center" />
    </asp:TemplateColumn>

    <asp:TemplateColumn>
    <ItemTemplate>
    <asp:LinkButton ID="btnEdit" CommandName="Edit" runat="server" Text="Upload" ToolTip="Upload Drawing"
    CausesValidation="false" />
    </ItemTemplate>
    <ItemStyle HorizontalAlign="Center" />

    </asp:TemplateColumn>

    </Columns>
    </asp:DataGrid>
    </td>
    </tr>
    </table>
    </asp:Content>

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #718232
    Hi Anil,

    Using this link i try to encrypt my source code and then past on DNS summary when i click on View option nothing has been shown in that...

    http://www.webtoolhub.com/tn561359-html-encrypter.aspx

    How to encrypt can you pl guide me ...

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #718240
    Use the HTML enocder in ordr to encode the HTML tags and use the code block

    [ code ]

    [/ code ]

    remove the space as this is for demonstration.

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #718269
    Hi Anil,

    this is my code but nothing to be displayed in my Resource...



    "
    <Script Language='Javascript'>
    <!-- HTML Encryption provided by iWEBTOOL.com -->
    <!--
    document.write(unescape('%3C%74%61%62%6C%65%20%63%65%6C%6C%70%61%64%64%69%6E%67%3D%22%32%22%20%63%65%6C%6C%73%70%61%63%69%6E%67%3D%22%32%22%20%77%69%64%74%68%3D%22%31%30%30%25%22%20%61%6C%69%67%6E%3D%22%63%65%6E%74%65%72%22%20%62%6F%72%64%65%72%3D%22%30%22%3E%0D%0A%20%20%20%20%20%20%20%20%3C%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%3C%74%64%20%61%6C%69%67%6E%3D%22%72%69%67%68%74%22%20%76%61%6C%69%67%6E%3D%22%74%6F%70%22%20%73%74%79%6C%65%3D%22%77%69%64%74%68%3A%20%33%30%25%3B%20%68%65%69%67%68%74%3A%20%35%25%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%61%62%6C%65%20%77%69%64%74%68%3D%22%32%38%25%22%20%68%65%69%67%68%74%3D%22%31%30%30%25%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%72%20%76%61%6C%69%67%6E%3D%22%6D%69%64%64%6C%65%22%20%73%74%79%6C%65%3D%22%68%65%69%67%68%74%3A%20%32%35%25%22%20%61%6C%69%67%6E%3D%22%72%69%67%68%74%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%73%74%79%6C%65%3D%22%68%65%69%67%68%74%3A%20%32%31%25%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%61%62%6C%65%20%62%6F%72%64%65%72%3D%22%31%22%20%63%65%6C%6C%70%61%64%64%69%6E%67%3D%22%30%22%20%63%65%6C%6C%73%70%61%63%69%6E%67%3D%22%30%22%20%63%6C%61%73%73%3D%22%54%65%78%74%56%65%72%64%61%6E%61%4E%61%76%79%38%22%20%77%69%64%74%68%3D%22%31%30%30%25%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%63%6F%6C%73%70%61%6E%3D%22%32%22%20%61%6C%69%67%6E%3D%22%63%65%6E%74%65%72%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%4C%65%67%65%6E%64%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%63%6C%61%73%73%3D%22%74%69%74%22%20%61%6C%69%67%6E%3D%22%6C%65%66%74%22%20%77%69%64%74%68%3D%22%37%30%25%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%44%72%61%77%69%6E%67%73%20%55%70%6C%6F%61%64%65%64%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%61%6C%69%67%6E%3D%22%72%69%67%68%74%22%20%73%74%79%6C%65%3D%22%62%61%63%6B%67%72%6F%75%6E%64%2D%63%6F%6C%6F%72%3A%50%61%6C%65%47%72%65%65%6E%20%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%6E%62%73%70%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%63%6C%61%73%73%3D%22%74%69%74%22%20%61%6C%69%67%6E%3D%22%6C%65%66%74%22%20%77%69%64%74%68%3D%22%37%30%25%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%41%64%76%61%6E%63%65%64%20%44%72%61%77%69%6E%67%73%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%61%6C%69%67%6E%3D%22%72%69%67%68%74%22%20%73%74%79%6C%65%3D%22%62%61%63%6B%67%72%6F%75%6E%64%2D%63%6F%6C%6F%72%3A%47%61%69%6E%73%62%6F%72%6F%20%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%6E%62%73%70%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%63%6C%61%73%73%3D%22%74%69%74%22%20%61%6C%69%67%6E%3D%22%6C%65%66%74%22%20%77%69%64%74%68%3D%22%37%30%25%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%50%65%6E%64%69%6E%67%20%66%6F%72%20%44%72%61%77%69%6E%67%20%55%70%6C%6F%61%64%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%61%6C%69%67%6E%3D%22%72%69%67%68%74%22%20%73%74%79%6C%65%3D%22%62%61%63%6B%67%72%6F%75%6E%64%2D%63%6F%6C%6F%72%3A%20%4C%69%67%68%74%59%65%6C%6C%6F%77%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%6E%62%73%70%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%63%6C%61%73%73%3D%22%74%69%74%22%20%61%6C%69%67%6E%3D%22%6C%65%66%74%22%20%77%69%64%74%68%3D%22%37%30%25%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%50%65%6E%64%69%6E%67%20%66%6F%72%20%44%72%61%77%69%6E%67%20%75%70%6C%6F%61%64%20%41%66%74%65%72%20%31%35%20%64%61%79%27%73%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%74%64%20%61%6C%69%67%6E%3D%22%72%69%67%68%74%22%20%73%74%79%6C%65%3D%22%62%61%63%6B%67%72%6F%75%6E%64%2D%63%6F%6C%6F%72%3A%4C%69%67%68%74%53%61%6C%6D%6F%6E%20%22%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%26%6E%62%73%70%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%61%62%6C%65%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%72%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%61%62%6C%65%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2F%74%64%3E%0D%0A%20%20%20%20%20%20%20%20%3C%2F%74%72%3E%0D%0A%20%20%20%20%3C%2F%74%61%62%6C%65%3E'));
    //-->
    </Script>
    "

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #718274
    Hai Naveen,
    I think you didn't read the guidelines to post the resources.
    Or your interpretation was not correct as per the guidelines.
    Check once again the main points:
    1) Encrypt total source code
    Ans. It means you need to make the formatting of your resourceand doesn't mean that you encrypt it and then sent it.
    Here Encryption means apply the formatting like if there is some code in your resource, use the "code" block, if you want something to be bold or strong, use their syntax to be [b]bold[/b] or [strong]strong[/strong]
    2) Copy that content and place it in DNS site within encrypt code blocks..
    Ans. It means that once the formatting is completed, then you just need to copy all the contents and paste it to the DNS website.
    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #718304
    Thanks to ALL..

    Successfully submited my Resource....

    Thanks once again...

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.