Thursday, November 23, 2023

Rad card Telerik

 <telerik:RadCard ID="RadCardInbox" runat="server" Width="285px"    >

    


    <telerik:CardBodyComponent runat="server">

        <telerik:CardTitleComponent runat="server">

            Tulip time

        </telerik:CardTitleComponent>


        <p>The tulip season is just around the corner. If you still haven't decided on your spring destination, we have a suggestion- Holland, a.k.a the "flower shop of the world"!</p>

    </telerik:CardBodyComponent>


    <telerik:CardActionsContainerComponent runat="server" CardActionsAlignment="Start">

        <span class="k-button k-flat k-primary">Read more</span>

        <telerik:CardSeparatorComponent runat="server" Orientation="Vertical">

        </telerik:CardSeparatorComponent>

        <span class="k-button k-flat k-primary">Save for later</span>

    </telerik:CardActionsContainerComponent>

Visual Studio. How to stop temporarily open a file with a single click - click file visual studio - disable on click visual studio

 >Open visual studio

> Click on Tools menu

> Click on Option 

>Click on environment

>Under environment , click on Tabs and windows

>Under preview tab, Uncheck (Allow new files to be opened.....)


reference:-https://stackoverflow.com/questions/12534694/how-to-stop-visual-studio-from-opening-a-file-on-single-click


Wednesday, November 22, 2023

document.getElementById by asp control id

var myModal = document.getElementById('<%=divModalPopupDigitalSignature.ClientID%>');


<div class="modal fade" id="divModalPopupDigitalSignature"></div>



reference:- https://stackoverflow.com/questions/8141560/getelementbyid-is-not-working-in-asp-net

Tuesday, November 14, 2023

How to call a Javascript function in aspx page - Modal with div

 ScriptManager.RegisterStartupScript(inboxContentUpdatePanel, inboxContentUpdatePanel.GetType(), Guid.NewGuid().ToString(), String.Format("OpenManageDirectoryModal();"), true);



function OpenManageDirectoryModal() {

            debugger;

            //var divManageDirectory = document.getElementById('divManageDirectory');

            //divManageDirectory.style.display = 'block';

            $("#modal_ManageDirectory").modal("show");


        }


<div class="modal fade" id="modal_ManageDirectory" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-keyboard="false" data-backdrop="static" style="display: none;z-index:9999">

        <div class="modal-dialog bigmodal-dialog" role="document">

            <div class="modal-content">

                <asp:UpdatePanel ID="uc_modalupdatepanel" runat="server" UpdateMode="Always">

                    <ContentTemplate>

                        <uc1:UCManageDirectory runat="server" ClientIDMode="AutoID" ID="ucManageDirectory" />

                    </ContentTemplate>

                </asp:UpdatePanel>

            </div>

        </div>

    </div>

Card Bootstrap - with mobile UI-

 <div class="card-group">

  <div class="card">

    

    <div class="card-body">

      <div class="card-title">Card title</div>

      <div class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</div>

        <a href="#" class="btn btn-primary">Go somewhere</a>

    </div>

    

  </div>

  <div class="card">

    

    <div class="card-body">

      <h5 class="card-title">Card title</h5>

      <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>

    </div>

    

  </div>

  <div class="card">

    

    <div class="card-body">

      <h5 class="card-title">Card title</h5>

      <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>

    </div>

    

  </div>

</div>

===================================================

reference:-https://getbootstrap.com/docs/5.2/components/card/

https://stackoverflow.com/questions/34140793/bootstrap-4-responsive-cards-in-card-columns

Thursday, November 9, 2023

collapse show bootstrap 5

 https://www.w3schools.com/bootstrap5/bootstrap_collapse.php


https://getbootstrap.com/docs/5.0/components/collapse/?#usage


https://www.w3schools.com/bootstrap/bootstrap_ref_js_collapse.asp


https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_ref_js_collapse_simple&stacked=h


https://getbootstrap.com/docs/5.2/components/collapse/


https://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-collapse.php


https://getbootstrap.com/docs/4.0/components/collapse/

https://www.w3schools.com/bootstrap5/tryit.asp?filename=trybs_collapsible_in&stacked=h

https://www.tutorialrepublic.com/codelab.php?topic=bootstrap&file=creating-collapsible-element-via-data-attributes

How to remove underline from link - a href

Use style 

  text-decoration: none;

<a onclick="OpenManageJavaModal();" href="javascript:void(0);" style=" text-decoration: none;">Download Java Setup

                                        </a>

How to download a file from a href without opening it - Direct Downloading

 Use download attribute on a href

 <a title="Digital Signature User Manual" href="Download/DigitalSignature/Signer-UserManual.pdf" style=" text-decoration: none;" download>Download User Manual for Digital Signature

                                        </a>


href:- https://www.w3schools.com/tags/att_a_download.asp

Wednesday, November 8, 2023

ASP.NET Repeater - Cards Bootstrap

<asp:DataList runat="server" ID="repeaterInbox1" RepeatColumns="3" RepeatDirection="Horizontal">

            <ItemTemplate>

            <div class="card" style="width: 18rem;">

             <div "card-body">

                    <h5 class="card-title"><%#Eval("ApplicationId") %></h5>

                    <h6 class="card-subtitle mb-2 text-muted"><%#Eval("Subject") %>

                        

                    </h6>

                 <p class="card-text" ><%#Eval("FromUserName") %></p>

                 <p class="card-text"><%#Eval("ReceivedDate") %></p>

            </div>

        </div>

                </ItemTemplate>

            </asp:DataList>    

       

Monday, November 6, 2023

How to get select- 0 in dropdown list from database select query as first row - 0th index sql server

 ALTER PROCEDURE [dbo].[RPT_GetCrimeCategory]  

AS

BEGIN

-- SET NOCOUNT ON added to prevent extra result sets from

-- interfering with SELECT statements.

SET NOCOUNT ON;

select LKSCOMPLAINTSOURCE.LookupID, LKSCOMPLAINTSOURCE.Description from dbo.Lookup LKSCOMPLAINTSOURCE WITH(NOLOCK)where  LKSCOMPLAINTSOURCE.LookupCategory = 126

union 

select 0, 'Select'

END

How to convert comma separated column to single value column - comma separate to value

select distinct value as crimecategory, lu.Description from Investigation iv cross apply string_split(iv.crimecategory,',') Left join Lookup lu on value = lu.LookupID where (CrimeCategory != '' OR CrimeCategory != NULL) AND BranchId=30 


or


 SELECT VALUE FROM string_split('1, 3, 5', ',')


reference:-  https://www.geeksforgeeks.org/how-to-turning-a-comma-separated-string-into-individual-rows-in-sql-server/

Remove blank rows from column in sql select query

Use distinct keyword and null or 'xyz' (blank values)

select distinct value as crimecategory, lu.Description from Investigation iv cross apply string_split(iv.crimecategory,',') Left join Lookup lu on value = lu.LookupID where (CrimeCategory != '' OR CrimeCategory != NULL) AND BranchId=30 



 reference:- https://stackoverflow.com/questions/10912237/sql-select-distinct-rows-and-ignore-row-if-blank


https://stackoverflow.com/questions/30284503/how-to-remove-blank-rows-from-sql-result-set

Select stored procedure- select query to XML

 ALTER PROCEDURE [dbo].[SSP_AllState] --1  

  

  

AS   

BEGIN  

SELECT CAST((SELECT [StateId]  

      ,[StateName]  

      ,[StateNameInLocal]  

      ,[StateCode]  

      ,[IsActive]  

      ,[CreatedBy]  

      ,[CreatedDate]  

      ,[UpdatedBy]  

      ,[UpdatedDate]