Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7855909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:31:28+00:00 2026-06-02T20:31:28+00:00

I am using an .ascx user control where i populating employee data along with

  • 0

I am using an .ascx user control where i populating employee data along with employee picture.
while on clicking employee picture i want to display a dialog where i want to have one text field and a text box for input from user. Click event is firing fine but with dialog it gives me the error of “Microsoft JScript runtime error: Object doesn’t support property or method ‘dialog'”. Could please anyone help me to populate a dialog with a text field and text box. I am really new to the JQUERY and struggling to get it work.

In the following code snippet i have added a dialog code from one of the example i found online.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="OpenAccessDataProvider,a4a794260c0b4440b466f75d11146db8.ascx.cs" Inherits="SitefinityWebApp.SfCtrlPresentation.OpenAccessDataProvider_a4a794260c0b4440b466f75d11146db8" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Fields" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<telerik:RadListView ID="dynamicContentListView" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
    <LayoutTemplate>
        <ul class="sfitemsList sfitemsListTitleDateTmb">
            <asp:PlaceHolder ID="ItemsContainer" runat="server" />
        </ul>
    </LayoutTemplate>

        <ItemTemplate>
      <li class="sfitem sfClearfix">
            <h2 class="sfitemTitle">
                <sf:DetailsViewHyperLink ID="DetailsViewHyperLink" TextDataField="Title" runat="server" />
            </h2>
           <sf:AssetsField ID="AssetsField1" runat="server" DataFieldName="Picture" />
           <sf:SitefinityLabel ID="SitefinityLabel1" runat="server" Text='<%# Eval("Designation")%>'  WrapperTagName="div" HideIfNoText="true" CssClass="sfitemShortTxt" />           
          <sf:SitefinityLabel ID="SitefinityLabel2" runat="server" Text='<%# Eval("CompanyName")%>' WrapperTagName="div" HideIfNoText="true" CssClass="sfitemShortTxt" />
          <sf:AssetsField ID="AssetsField2" runat="server" DataFieldName="Documents"/>
      </li>
    </ItemTemplate>
</telerik:RadListView>

<sf:Pager id="pager" runat="server"></sf:Pager>

<script type="text/javascript">
    $(document).ready(function () {
        $(".sfClearfix .sfimageWrp img").click(function () {

//            $(document).ready(function () {
                var $dialog = $('<div></div>')
        .html('This dialog will show every time!')
        .dialog({
            autoOpen: false,
            title: 'Basic Dialog'
        });

                $('#opener').click(function () {
                    $dialog.dialog('open');
                    // prevent the default action, e.g., following a link
                    return false;
                });
//            });

            //alert("HEY THERE " + $(this).attr("src")); 
        });
    });
</script>

Regards.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:31:30+00:00Added an answer on June 2, 2026 at 8:31 pm

    Got it working guys. Just added a div that is for dialog and than from picture click just called the div. Also, added a JQuery.noConflict(); to prevent any conflicts between Sitefinity and JQuery libraries. Following is the code snippet

    <div class="dialogTest"> <br />
    <br />
    Please enter your email address: <input type="text" name="emailAddress" style="width:300px;" /><br /><br />
    
    <asp:TextBox ID="txtBox" runat="server"></asp:TextBox> <br/>
    <asp:Button ID="Button1" runat="server" Text="Button" CausesValidation="False" 
            onclick="Button1_Click" />
    </div>
    
    <script type="text/javascript">
    $j = jQuery.noConflict();
    $j(document).ready(function () {
        $j(".sfClearfix .sfimageWrp img").click(function () {
            $j(".dialogTest").addClass("open");
            //return $j(this).attr("src");
        });
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any recommendations about using a .ascx file (user control) versus a
I have a page containing a control called PhoneInfo.ascx. PhoneInfo is dynamically created using
I want to create a user control DerivedUserControl.ascx that derives form another user control
I have created a web user control (MemberDetails.ascx) which is loaded dynamically on a
I am using a user control (.ascx) as below <div class=ui-widget id=w_instruction> <div class=ui-state-instruction
I have a user control with some ajax functionality. I am using smart part
I'm using ASP.NET MVC- I've got a DropDownList rendered in a user control (ascx
I have a user control loaded on the default.aspx page using the Control UControl
I have a user control header with label to display amount of item in
I have a user control. It contrains LinkButton. I want to attach an click

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.