Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all 5678 articles
Browse latest View live

How to hide Ajax pie chart legends (3.5 version) or click event for ajax pie chart???

$
0
0

I want to hide legends of a ajax pie chart but looks like there is no property for the same.

Any way to handle this?

Or Anyway to create a click event for Pie chart? My requirement is to show data in a grid based on click of pie chart area.

E.g Pie chart shows Marks of three subjects. On click on each subject on pie chart, show subject details in a grid.

Thanks in advance...


Why does ModalPopupExtender closes on Postback

$
0
0

I am using ModalPopupExtender to display a panel (with data entry form in it). The problem is that it closes on every postback. Although I can keep it open using ModalPopupExtender.show () method, but I don't like this approach. My questions are:

1. Why does the modal closes on every postback.

2. I have looked into a few hacks to keep it open but can't this behavior be fixed?

Thanks...

Which Modal Popup to use to add/edit data

$
0
0

I am developing a large asp.net ajax website. To provide better user experience, I want the user to perform Add/Edit on the same page using a Modal Popup without navigating to another page. I have tried using ajaxcontroltoolkit ModalPopup but it comes with many issues including:

1. The ModalPopup closes on every page postback.

2. The ModalPopup shows up again if I refresh the page after performing Add/Edit.

Can someone guide to me a better modal popup (could be jquery based) which can be used to add/edit data. An example would be appreciated. Thanks.

Slideshow Extender fails on page reload

$
0
0

I have a page with a slideshow extender.

It works most of the time.  Here is the situation where it does not work.

On the same page are a set of hyperlinks that point to various points on the same page using anchors such as MyPage.aspx#Anchor1.

When one of these hyperlinks is clicked, the page is reloaded using Redirect(MyPage.aspx#Anchor1).

The error happens when I click a button that is supposed to activate the slideshow.  Apparantly, the Service method fails.  I have tried to debug it, but debug never gets there.

Any ideas most appreciated.

 

 

PasswordStrength extender cannot be added

$
0
0

Last night (July 19'th) I installed the Ajax control toolkit into my Visual studio 2012. I used the auto install feature in the VS.

It APPEARS to have installed properly, my toolbox shows a large number of Ajax controls to pick from, and if I click to extend a textbox, some of the Ajax tools show there as well, but not ALL of them.

In particular I want to use the PasswordStrength extender, but it does not show up to select.

I was initially using DotNet 4.5, tried backing off to 4.0, but it still isn't there, so that can't be it.

Any ideas why this might not be showing up and how I can make it?

This SHOULD be the most current (June release) I would think as I didn't 'pick' it, VS did using Nuget.

*I did remember to set it to be a Password box, not a single line box.

text inside the brackets

$
0
0

i am trying to search 

when any text any enter adn show in textbox it must be in curly bracketsl..how i do thiss

any help

Ajax control not functioning after changing of project

$
0
0

I had change my project from C# ASP.NET empty web application (.NET Framework 4.5) over to C# ASP.NET web form application (.NET Framework 4.5). After changing over I realise that my AJAX control isn't working at all. Below is one part of my code of password strength ajax control. Do help me check if I did anything wrongly or forget to add something into it. Thanks!

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"><asp:ToolkitScriptManager ID="ToolkitScriptManager1"
runat="server"></asp:ToolkitScriptManager><asp:PasswordStrength ID="PasswordStrength1" runat="server"
TargetControlID="txtPassword"
DisplayPosition="RightSide"
StrengthIndicatorType="Text"
PreferredPasswordLength="10"
PrefixText="Strength: "
MinimumNumericCharacters="0"
MinimumSymbolCharacters="0"
RequiresUpperAndLowerCaseCharacters="false"
TextStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"></asp:PasswordStrength><asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox></asp:Content>

Add on: there is no error in it just that it not working (nothing happen) for password strength and the other ajax controls.

I try adding this into web.config:

<add assembly="AjaxControlToolkit, Version=4.0.30319.0, Culture=neutral, PublicKeyToken=28F01B0E84B6D53E"/><add tagPrefix="asp" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=4.0.30319.0, Culture=neutral, PublicKeyToken=28F01B0E84B6D53E"/>

I got this error after adding that into webconfig:

Ajax toolkit : HTML Editor

$
0
0

Hi friends,

I am working on HTML editor control, My requirement is to disable the cut (Clt-X) ,copy(Clt-C) ,paste(Clt-V) option on the HTMl Editor Textbox.

I have searche a lot of site but could not find any related.

Colud any help me on this.

 It very urgent.

Thanks & Regards

seena

 


Scrollbar missing in Collapsible Panel

$
0
0

Hi all,

I was wondering if anyone else had run into this issue with the Collapsible Panel in Internet Explorer 10 and above.

I have a collapsible panel control which when opened, depending on the content inside the panel, sometimes requires a vertical scrollbar to be displayed.

In IE9, Firefox and Chrome this works fine but as soon as someone opens the panel in IE10 or above the scrollbar doesn't show.

Any ideas???

Many thanks, G.

How to retain javascript variables after postback of an updatepanel?

$
0
0

after a user changes a select element which triggers a postback of an updatepanel, I'm trying to set the value of that same select to the selected value after the postback has completed, but somehow the value of the value I set in a hidden field is lost after the postback.


function countrypostback() {
$('#countryid').val($('select[name="countryselect"]').val());
__doPostBack('upnlSearch', '');
}

$(document).ready(function () {
$.ajax({
type: "GET",
url: "/service.svc/countries/",
data: "",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
for (var i in msg) {
var resultitems = '<select onchange="countrypostback();" class="textbox" name="countryselect" id="countryselect">';
for (var i in msg) {
if (msg[i].name != '') {
resultitems += '<option value="' + msg[i].value + '">' + msg[i].name + '</option>';
}
}
resultitems += '</select>';
$('#countryselect').html(resultitems);
}
}
});

//here I'm trying to set the value of the dropdown to the value that was selected before the postback
$("#countryselect").val($('#countryid').val());


<input type="hidden" id="countryid" name="countryid" />

<asp:UpdatePanel ID="upnlSearch" runat="server">
<ContentTemplate>


<span id="countryselect"></span>

</ContentTemplate>
</asp:UpdatePanel>

I tried placing the hidden field countryid both outside and inside the updatepanel, but that does not make a difference, I still have an empty formfield when I try to access it via

$('#countryid').val()

I'd rather not work with viewstate (if at all possible) since that increase that pageload.

ModalPopupExtender Not Popping Up - Loads in table

$
0
0

I have a page when I click a certain set of sequences (Delete then OK to Delete then Add New) the modalPopupExtender displays inside of a table.  It supposed to be in a lightbox type display.  All other times it pops up correctly.

Here's the front page .aspx

<%@ Page  validateRequest="false" Title="Department Meeting Notes" Language="VB" MasterPageFile="~/Masters/mstrIntranet.master" AutoEventWireup="false" CodeFile="Select.aspx.vb" Inherits="Tools_MeetingNotes" MaintainScrollPositionOnPostBack="True"%>

<asp:Content ID="Content1" ContentPlaceHolderID="contentplaceholder2" Runat="Server">

<style type="text/css"">

                .modalBackgroundClass {

                background-color:White;

                filter:alpha(opacity=70);

                opacity:0.7; }

</style>

<script type="text/javascript" src="../../includes/tinymce/tinymce.min.js"></script>

<script type="text/javascript">

                tinymce.init({

                selector: "textarea#elm1",

                theme: "modern",

                height: 200,

                plugins: [

                "advlist autolink link image lists charmap print preview hr anchor pagebreak ",

                "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime nonbreaking",

                "save table contextmenu directionality  template paste textcolor iespell"    ],

                content_css: "css/content.css",

                menubar: "edit insert table format",

                toolbar: "table | undo redo | bold italic underline subscript superscript | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | forecolor backcolor | iespell | ",

                style_formats: [

                { title: 'Bold text', inline: 'b' },

                { title: 'Title', inline: 'b', size: '6' },

                { title: 'Red text', inline: 'span', styles: { color: '#ff0000'} },

                { title: 'Red header', block: 'h1', styles: { color: '#ff0000'} }                              ]

                });

</script>

<script language="JavaScript" type="text/javascript">

                function transferData() {

                document.getElementById('ctl00_contentplaceholder2_MeetingInfoRvw').innerHTML = document.getElementById('ctl00$contentplaceholder2$elm1').value;    }

</script>

<table cellpadding="0" cellspacing="0" style="width: 720px; height: 446px;">

<tr>

<td height="449" valign="top">

<form id="Form1" name="form1" method="post" runat="server">

<asp:ScriptManager ID="scriptmanager1" runat="server"></asp:ScriptManager>

<table cellpadding="0" cellspacing="0" class="text" border="0" style="width: 720px;">

<tr valign="top">

<td style="width: 149px" class="textBold" >Year:</td>

<td style="width: 571px" colspan="3" >

<asp:DropDownList ID="YearDD" runat="server" autopostback="true">

                <asp:ListItem>2013</asp:ListItem>

                <asp:ListItem>2012</asp:ListItem>

</asp:DropDownList></td>

</tr>

<tr valign="top">

<td style="width: 149px" class="textBold" >Month: </td>

<td style="width: 412px">

<asp:DropDownList ID="MonthDD" runat="server" AutoPostBack="True">

                <asp:ListItem Text="January" Value="1" ></asp:ListItem>

                <asp:ListItem Text="February" Value="2"></asp:ListItem>

                <asp:ListItem Text="March" Value="3"></asp:ListItem>

                <asp:ListItem Text="April" Value="4"></asp:ListItem>

                <asp:ListItem Text="May" Value="5"></asp:ListItem>

                <asp:ListItem Text="June" Value="6"></asp:ListItem>

                <asp:ListItem Text="July" Value="7"></asp:ListItem>

                <asp:ListItem Text="August" Value="8"></asp:ListItem>

                <asp:ListItem Text="September" Value="9"></asp:ListItem>

                <asp:ListItem Text="October" Value="10"></asp:ListItem>

                <asp:ListItem Text="November" Value="11"></asp:ListItem>

<asp:ListItem Text="December" Value="12"></asp:ListItem>

</asp:DropDownList>

<asp:Label ID="errorLBL" runat="server" Text=""></asp:Label>

</td>

<td style="text-align: right">

<asp:LinkButton ID="AddNewLinkBtn" runat="server" class="textBold" CausesValidation="false" CommandName="AddNewLinkBtn_Click" >Add New</asp:LinkButton>

</td>

<td style="width: 10px;"></td>

</tr>

<tr valign="top">

<td style="height: 8px;" colspan="4" ></td>

</tr>

<tr valign="top">

<td colspan="4" class="textBold" style="height: 16px">

<table cellpadding="3" cellspacing="0" style="border-style: inset; border-width: 1px; width: 730px">

<tr>

<td style="height:5px;"></td>

</tr>

<asp:Repeater ID="Repeater1" runat="server" >

<ItemTemplate>     

<%i = i +1 %>                          

<tr bgcolor = <%=(getRowColor(i)) %>>

<td style="width: 10px">&nbsp;</td>

<td style="width: 400px;" class="text"><%#Eval("thisMonth") %> <%#Eval("thisDay")%>

</td>

<td style="text-align: right"  class="text"><asp:LinkButton ID="EditBtn" runat="server" CommandName="Edit" CommandArgument='<%#Eval("id")%>' OnCommand="Repeater1_ItemCommand"   Text="Edit" CausesValidation="false"></asp:LinkButton>

                </td>

<td style="text-align: right" style="width: 40px">&nbsp;</td>

<td style="text-align: right" style="width: 40px"  class="text">

<asp:LinkButton ID="PreviewBtn" runat="server" CommandName="Preview" CommandArgument='<%#Eval("id")%>' OnCommand="Repeater1_ItemCommand"  Text="Preview" CausesValidation="false"></asp:LinkButton>

</td>

<td style="width: 40px">&nbsp;</td>

<td style="text-align: right" style="width: 40px"  class="text">

<asp:LinkButton ID="DeleteBtn" runat="server" CommandName="Delete" CommandArgument='<%#Eval("id")%>'  OnCommand="Repeater1_ItemCommand"  Text="Delete"   CausesValidation="false" OnClientClick='<%# Eval("curMeeting","return confirm(""Are you sure you want to delete the {0} \n                        Meeting Notes?"")") %>' ></asp:LinkButton>

</td>

<td style="width: 10px">&nbsp;</td>

</tr>

</ItemTemplate>

</asp:Repeater>

 

<tr>

<td style="height:5px;"></td>

</tr>

</table>

</td>

</tr>

 

<tr valign="top">

<td colspan="4">&nbsp;</td>

</tr>

<tr valign="top">

<td colspan="4" class="style28">&nbsp;&nbsp;</td>

</tr>

<tr valign="top">

<td colspan="4">

<%--~~~~~~~~~~~~        Add New Meeting Info  Area  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>

<div id="divPopUPAdd" class="contents"

style="width:900px;height:550px;border:solid1px#dddddd; top:50px; position:relative; left: 50px;" runat="server" align="center">

<div id="Layer2" style="position:absolute; left:685px; top:83px; width:97px; height:17px; z-index:5">

<span class="text"><font color="#990000">*Required field </font></span></div>                        

<ajaxToolkit:ModalPopupExtender ID="mpe1" runat="server"

BehaviorID="mpe1"

TargetControlID="AddNewLinkBtn"

PopupControlID="divPopUPAdd"

BackgroundCssClass="modalBackgroundClass" DropShadow="false">

</ajaxToolkit:ModalPopupExtender>

 

<table cellpadding="0" cellspacing="0" style="width: 900px;" border="2" bgcolor="White"  bordercolor="#000000">

<tr>

<td>

<table cellpadding="0" cellspacing="0" style="width: 843 px;" border="0">

<tr>

<td>&nbsp;</td>

<td colspan="3" align="left"><strong class="title1">

<asp:Label ID="headingLBL" runat="server" Text="Add New Dept Meeting Notes"></asp:Label>

</strong><hr></td>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

<td class="style29" align="left">Meeting Date<font color="#990000">*</font>:</td>

<td class="style1" align="left">

           <asp:TextBox ID="MeetingDatetxt" runat="server" style="margin-bottom: 0px" Width="78px" CausesValidation="true"></asp:TextBox>

           <asp:RequiredFieldValidator ID="AddDateVld" runat="server" ErrorMessage="Please enter a date" ControlToValidate="MeetingDatetxt" Display="Dynamic" CssClass="textBold" SetFocusOnError="True"></asp:RequiredFieldValidator>

</td>

<td style="width: 524px;" align="left"><asp:ImageButton ID="CalendarBtn" runat="server"  ImageUrl="~/Tools/Images/Calendar2.gif" CausesValidation="false" />

                      <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="MeetingDatetxt" PopupButtonID="CalendarBtn" ></ajaxToolkit:CalendarExtender>

           <asp:HiddenField ID="hdnID" runat="server" />

</td>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

<td  class="textBold" align="left" colspan="3">Meeting Notes Text<font color="#990000">*</font>:

           <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter info about the meeting" Display="Dynamic" ControlToValidate="elm1" SetFocusOnError="True"></asp:RequiredFieldValidator></td>

<td>&nbsp;</td>

</tr>

<tr>

<td> &nbsp;</td>

<td colspan="3" align="left">

 

<asp:TextBox ID="elm1" name="elm1" runat="server" TextMode="MultiLine" ClientIDMode="Static"  Width="766px" Height="200px"></asp:textbox></td>

<td> &nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

<td colspan="3">&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr>

<td>&nbsp;</td>

<td colspan="3" align="right">

<asp:Button ID="PreviewNotesBtn" runat="server" Text="Preview Notes" CausesValidation="False" onClientClick="transferData();" />&nbsp;&nbsp;&nbsp;

<asp:Button ID="btnHide" runat="server" Text="Cancel" OnClick="btnHide_Click" CausesValidation="False" />&nbsp;&nbsp;&nbsp;

<asp:Button ID="SubmitAddBtn" runat="server" Text="Submit"/>

<asp:Button ID="SubmitEditBtn" runat="server" Text="Submit" />

</td>

<td>&nbsp;</td>

</tr>

</table>

</td>

</tr>

</table>

<br/>

</div>

<%--~~~~~~~~~~~~     END   Add New Meeting Info  Area  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>

 

<%'~~~~~~~~~~~~~~~~   REVIEW PANEL     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %>

<ajaxToolkit:ModalPopupExtender ID="mpe2" runat="server"

BehaviorID="mpe2"

TargetControlID="PreviewNotesBtn"

PopupControlID="reviewDiv"

BackgroundCssClass="modalBackgroundClass"

DropShadow="false"

CancelControlID="BackBtn" >

</ajaxToolkit:ModalPopupExtender>

<div id="reviewDiv" align="center" style="border: 1px double #000000; display:none; width:750px; height: 600px; top: 780px; overflow-y:scroll; position: relative; word-wrap: break-word; background-color: #FFFFFF;" runat="server">

<table cellpadding="0" cellspacing="0" style="width: 730px;" border="0" bgcolor="White" align="left">

<tr>

<td style="width: 14px; "> </td>

<td colspan="3" align="left"><asp:Label ID="MeetingDateRvw" runat="server" Text="" Visible="false"></asp:Label></td>

<td  style="width: 10px;"> </td>

</tr>

<tr>

<td> </td>

<td colspan="3" align="left"><asp:Label ID="lbl9" runat="server" Text=""></asp:Label><asp:HiddenField ID="hdnReviewID" runat="server" /></td>

<td> </td>

</tr>

<tr>

<td></td>

<td colspan="3" align="left"><asp:Label ID="MeetingInfoRvw" runat="server" Text=""></asp:Label>

</td>

<td></td>

</tr>

<tr>

<td> </td>

<td colspan="3"><asp:Label ID="lblRvw" runat="server" Text=""></asp:Label></td>

<td></td>

</tr>

<tr>

<td> </td>

<td colspan="3" align="right"><asp:Button ID="BackBtn" runat="server" Text="Back" /></td>

<td> </td>

</tr>

</table>

</div>

<%'~~~~~~~~~~~~~~~~   END REVIEW PANEL     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %>

</td>

</table>

</form>

</td>

</tr>

</table>

</td>

</tr>

</table>

</asp:Content>

*****************************************************************************

 Here's the Code Behind: aspx.vb

*****************************************************************************

Partial Class Tools_MeetingNotes

 Inherits System.Web.UI.Page

 Public i, j As Integer

 Public previewText As String

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

   If Not (Page.IsPostBack) Then

      getNotesList()

       i = 1

       j = 1

    End If

 End Sub

  '~~~~~~~~~~ This is the Add New link on the Main Select Page

 Protected Sub AddNewLinkBtn_Click(sender As Object, e As System.EventArgs) Handles AddNewLinkBtn.Click

     clearFields("a")

     SubmitAddBtn.Visible = True

     SubmitEditBtn.Visible = False

     headingLBL.Text = " Add New Dept Meeting Notes"

 End Sub

  '~~~~~~~~~~     In Panel - Preview Button  PreviewNotesBtn  ~~~~~~~~~~~~~~~~~~

 Protected Sub PreviewNotesBtn_Click(sender As Object, e As System.EventArgs) Handles PreviewNotesBtn.Click

     Dim thisMeeting As String

     lbl9.Text = "here"

     thisMeeting = elm1.Text

     mpe1.Hide()

     mpe2.Show()

     MeetingInfoRvw.Text = thisMeeting

     MeetingInfoRvw.Visible = True

 End Sub

 '~~~~~~~~~~     In Panel - Add New Record Button  SubmitAddBtn  ~~~~~~~~~~~~~~~~~~

 Protected Sub SubmitAddBtn_Click(sender As Object, e As System.EventArgs) Handles SubmitAddBtn.Click

     '~~~~~~~~   CHECK TO SEE IF DATE / RECORD ALREADY IN DATABASE    ~~~~~~~~~~~~

     Dim mDate As Date = DateTime.Parse(MeetingDatetxt.Text, New System.Globalization.CultureInfo("en-US"))

     Dim mText As String = HttpUtility.HtmlEncode(elm1.Text)

     Dim param As SqlParameter() = New SqlParameter(0) {}

     param(0) = New SqlParameter("@sDate", mDate)

     Dim dr As SqlDataReader

     Dim strSQL As String

     strSQL = "Select * FROM DeptHeadMeetingNotes WHERE meetingDate = '" & mDate.ToString("yyyy/MM/dd") & "'"

     Dim i As Integer = 0

     dr = DataReaderClassIntranetSQL.GetDataReaderIntranetSQL(strSQL)

     Do While dr.Read

         i = i + 1

     Loop

     dr.Close()

     If (i > 0) Then

         Response.Write("<script language='javascript'>alert('There is already a record with that Meeting Date.');</script>")

     Else 

  '~~~~~~~~~~~~             OK Continue                      ~~~~~~~~~~~~~~~~~~~~

          Dim updater As String = Request.Cookies("LastName").Value

         Dim con As SqlConnection = ExecNonQuerySQL.addData

          strSQL = "INSERT INTO DeptHeadMeetingNotes (meetingDate, meetingNotes, updatedDate, updatedBy ) VALUES "

         strSQL = strSQL + "( @sDate, @sText, getDate() , @sUpdater )"

          Dim cmd As New SqlCommand(strSQL, con)

          cmd.Parameters.AddWithValue("@sDate", mDate)

         cmd.Parameters.AddWithValue("@sText", mText)

         cmd.Parameters.AddWithValue("@sUpdater", updater)

          con.Open()

         Dim result As Integer = cmd.ExecuteNonQuery()

          MeetingDatetxt.Text = ""

         elm1.Text = ""

         mpe1.Hide()

     End If

     getNotesList()

  End Sub

  '~~~~~~~~~~     In Panel - Submit Edit Button    SubmitEditBtn   ~~~~~~~~~~~~~~~~~~

 Protected Sub SubmitEditBtn_Click(sender As Object, e As System.EventArgs) Handles SubmitEditBtn.Click

      Dim thisID As Integer = hdnID.Value

     Dim mDate As Date = DateTime.Parse(MeetingDatetxt.Text, New System.Globalization.CultureInfo("en-US"))

     Dim mText As String = HttpUtility.HtmlEncode(elm1.Text)

     Dim updater As String = Request.Cookies("LastName").Value

      Dim strSQL As String

     strSQL = "UPDATE DeptHeadMeetingNotes SET meetingDate=@sDate, meetingNotes=@sText, updatedDate=getDate(), updatedBy=@sUpdater WHERE id=@ID;"

      Dim con As SqlConnection = ExecNonQuerySQL.addData

     Using con

       Using cmd As New SqlCommand(strSQL, con)

           cmd.CommandType = CommandType.Text

          cmd.Parameters.AddWithValue("@sDate", mDate)

          cmd.Parameters.AddWithValue("@sText", mText)

          cmd.Parameters.AddWithValue("@sUpdater", updater)

          cmd.Parameters.AddWithValue("@ID", thisID)

      Try

              con.Open()

              cmd.ExecuteNonQuery()

           Catch ex As Exception

              errorLBL.Text = ex.ToString

          Finally

              con.Close()

           End Try

       End Using

     End Using

      clearFields("a")

     mpe1.Hide()

 End Sub

  Protected Sub btnHide_Click(sender As Object, e As System.EventArgs) Handles btnHide.Click

     clearFields("a")

     headingLBL.Text = "Add Dept Head Meeting Notes"

 End Sub

  '~~~~~~~~~~~~~~~        NOTES   LIST   ~~~~~~~~~~~~~~~~~~~~~~~~~

 Protected Sub Repeater1_ItemCommand(sender As Object, e As CommandEventArgs)

  Dim s As String = e.CommandName

 Dim thisIDstr As String = e.CommandArgument

 Dim thisIDInt As Integer = CInt(thisIDstr)

  Dim strSQL As String

 Dim dr As SqlDataReader

  '~~~~~~~~~~~~~~~         DELETE     ~~~~~~~~~~~~~~~~~~~~

  If (e.CommandName.Equals("Delete")) Then

      strSQL = "Delete FROM DeptHeadMeetingNotes WHERE id = " & thisIDInt & ""

     Dim result As Integer = InsertRecord(strSQL)

     If (result > 0) Then

         System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">" & vbCrLf)

         System.Web.HttpContext.Current.Response.Write("alert(""Meeting Deleted Successfully! "")" & vbCrLf)

         System.Web.HttpContext.Current.Response.Write("</SCRIPT>")

     End If

     getNotesList()

End If

      '~~~~~~~~~~~~~~~         EDIT     ~~~~~~~~~~~~~~~~~~~~

     If (e.CommandName.Equals("Edit")) Then

          strSQL = "Select * FROM DeptHeadMeetingNotes WHERE id = " & thisIDInt & ""

         dr = DataReaderClassIntranetSQL.GetDataReaderIntranetSQL(strSQL)

          Do While dr.Read

             hdnID.Value = dr("id")

             MeetingDatetxt.Text = (dr("meetingDate"))

             elm1.Text = Server.HtmlDecode(dr("meetingNotes"))

         Loop

          mpe1.Show()

     headingLBL.Text = "Edit Dept Meeting Notes"

         SubmitAddBtn.Visible = False

         SubmitEditBtn.Visible = True

         dr.Close()

      End If

      '~~~~~~~~~~~~~~~~   PREVIEW     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      If (e.CommandName.Equals("Preview")) Then

         strSQL = "Select * FROM DeptHeadMeetingNotes WHERE id = " & thisIDInt & ""

         dr = DataReaderClassIntranetSQL.GetDataReaderIntranetSQL(strSQL)

         Do While dr.Read

             hdnReviewID.Value = dr("id")

             'MeetingDateRvw.Text = (dr("meetingDate"))

             MeetingInfoRvw.Text = Server.HtmlDecode(dr("meetingNotes"))

         Loop

         mpe2.Show()

     End If

  End Sub

  Protected Sub MonthDD_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles MonthDD.SelectedIndexChanged

     getNotesList()

 End Sub

  Public Sub getNotesList()

     errorLBL.Text = ""

     Repeater1.DataSource = Nothing

     Repeater1.DataBind()

      Dim thisDate, thisYear As Integer

     Dim strSQL As String

     Dim dr As SqlDataReader

      thisDate = MonthDD.SelectedValue

     thisYear = YearDD.SelectedValue

      strSQL = "SELECT id,  CONVERT(VARCHAR,meetingDate,107) as curMeeting, Day(meetingDate) as thisDay, DateName(Month,meetingDate) as thisMonth, Year(meetingDate) as thisYear FROM DeptHeadMeetingNotes "

     strSQL = strSQL + "WHERE Month(meetingDate) = '" & thisDate & "'AND Year(meetingDate) = '" & thisYear & "' "

     strSQL = strSQL + "ORDER BY meetingDate "

     dr = DataReaderClassIntranetSQL.GetDataReaderIntranetSQL(strSQL)

     If (dr.HasRows) Then

         Repeater1.DataSource = dr

         Repeater1.DataBind()

     Else

         errorLBL.Text = "<font color=red><b>There are no records found for this month.</b></font>"

     End If

       clearFields("a")

 End Sub

  Protected Function getRowColor(thisI As Integer) As String

     If (thisI Mod 2 > 0) Then

         Return "#E7EFF7"

     Else

         Return "#FFFFFF"

     End If

  End Function

  Sub clearFields(thisButton As String)

     If (thisButton = "a") Then

          SubmitAddBtn.Visible = True

         SubmitEditBtn.Visible = False

     End If

      If (thisButton = "e") Then

          SubmitAddBtn.Visible = False

         SubmitEditBtn.Visible = True

     End If

     MeetingInfoRvw.Text = ""

     MeetingDatetxt.Text = ""

     elm1.Text = ""

  End Sub

  Sub clearPreview()

     'MeetingInfoRvw.Text = ""

 End Sub

  Protected Sub YearDD_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles YearDD.SelectedIndexChanged

     MonthDD.SelectedIndex = 0

     getNotesList()

 End Sub

End Class

 

Any ideas?

Ajax Toolkit is affecting page load timing

$
0
0

HI all,

     This might be a duplicate thread.yet i am asking,in my page i am using ajax tabcontainer .Everthing working fine.But while testing when i looked into the page load for the first time it is taking hell a lot of time.Is there any way to compress the the axd file(scriptresource.axd).Please help me to find the solution.

Note:my page is the landing page so i cant use the caching tech.

Regards,

Hsakarp.

UpdatePanel & IE8: Constantly refreshing

$
0
0

I have an ASP UpdatePanel object embedded on a page. This page is actually used to display a custom web part in SharePoint 2010. What I'm wanting to happen is for my page to load and, almost immediately, I want my panel to render.

Here is the code I have...

<asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional"><ContentTemplate>..Abstracted Content..</ContentTemplate><Triggers><asp:PostBackTrigger ControlID="tmrAutoRefresh" /><asp:PostBackTrigger ControlID="tmrAccessToken" /><asp:AsyncPostBackTrigger ControlID="tmrDelayedFeedRender" EventName="Tick" /></Triggers></asp:UpdatePanel><div id="divTop"><asp:Timer ID="tmrAutoRefresh" Enabled="false" runat="server" OnTick="tmrAutoRefresh_Click" /><asp:Timer ID="tmrAccessToken" Enabled="false" runat="server" OnTick="tmrAccessToken_Tick" /><asp:Timer ID="tmrDelayedFeedRender" Enabled="true" runat="server" OnTick="tmrDelayedFeedRender_Tick" Interval="10" EnableViewState="true" /></div>

And here's my server-side event handler

        protected void tmrDelayedFeedRender_Tick(object sender, EventArgs e)
        {
            using (new SPMonitoredScope("redacted.tmrAccessToken_Tick"))
            {
                tmrDelayedFeedRender.Enabled = false;
                DelayedUpdatePanel.Visible = true;
                if (!string.IsNullOrEmpty(m_oUserEntities.RefreshToken)) btnLogin_Click(null, null);

            }

        }

This works perfectly in IE9, Chrome, & FireFox. In IE8, the panel is constantly refreshing. It's not obvious when looking at the page, but using Fiddler, I can see constant HTTP requests being made by my page. 

I'll apologize in advance for some of my abstractions, but I'm currently under an NDA. 

ToolkitScriptManager error using W3C validation service

$
0
0

hello,

i have been trying to figure out why i recieve these errors from the W3C Markup Validation Service.  to access this tool, i select F12>Validate>HTML tool in IEv10.

the errors i receive look like this:

document type does not allow element X here; missing one of Y start-tag

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

•Line 10, column 102: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag …tScriptManager1_HiddenField" id="ToolkitScriptManager1_HiddenField" value="" />

•Line 11, column 562: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag …...h7Wv" />

•Line 16, column 56: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag …type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" />

•Line 17, column 102: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag …...aQBk1" />

•Line 28, column 167: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag …...CE=" />

does anyone have an idea why this occurs?

 

Ajax Control Toolkit not working on Azure

$
0
0

The Toolkit is working fine on the development machine (VS 2012, Toolkit version: 4.1.60919.0).

After publishing to Azure everything works fine except Toolkit - no errors, no problems - it simple isn't working. I have tried numerous solutions I found on the web but none of them worked. I believe in the end I would get it to work, but I do not want to spend hours and hours just to get it deployed.

I am thinking of completely dropping the Toolkit and look for the alternatives.

I still think there is a small chance that there is an elephant in the room that I don't see, so if anyone sees it please let me know.

Thanks


ModalPopupExtender opens up on browser refresh

$
0
0

I am using the ajaxcontroltoolkit ModalPopupExtender with GridView to add/edit record. User adds a new record or update an existing one in the popup modal. I am following the example at http://mattberseth.com/blog/2008/04/masterdetail_with_the_gridview.html. Everything is working fine except for one issue. If I click the browser refresh button after saving/updating the record, the modal dialog opens up again. Also the page returns to its previous state where it was before adding/updating the record. Can someone help me on this one?

AJAX ACCORDION

$
0
0

Hi all,

In the below code i am unable to align the Registration Date Textboxes (txtRegDateFrom AND txtRegDateTo)side by side and the same with Age Textboxes also, How to code this or what are changes that i have to make in my code...?

<div style="padding: 10px; width: 98%;">
<asp:Accordion ID="StandardAccordion" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250" RequireOpenedPane="false"
SuppressHeaderPostbacks="False" Width="101%" Height="0px" CssClass="style1" AutoSize="None">
<Panes>
<ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass=""
HeaderCssClass="">
<Header>
CRITERIA FOR PATIENT INFORMATION REPORT
</Header>
<Content>
<table>
<tr>
<td style="height: 20px; width: 150px;">
<div class="left" style="font-family: Verdana; font-size: small; color: #000000;
font-weight: 600; width: 400px; height: 42px;">
<asp:CheckBox ID="chkRegDate" runat="server" />
Registration date:
<asp:TextBox ID="txtRegDateFrom" runat="server" Height="20px" Width="100px" ></asp:TextBox>
<asp:CalendarExtender ID="txtRegDateFrom_CalendarExtender" runat="server" Enabled="True"
TargetControlID="txtRegDateFrom">
</asp:CalendarExtender>
<span style="padding-left: 3px;">To: </span>
<asp:TextBox ID="txtRegDateTo" runat="server" Height="20px" Width="100px" ></asp:TextBox>
<asp:CalendarExtender ID="txtRegDateTo_CalendarExtender" runat="server" Enabled="True"
TargetControlID="txtRegDateTo">
</asp:CalendarExtender>
</div>
</td>
<td style="height: 20px; width: 190px;">
<div class="left" style="font-family: Verdana; font-size: small; color: #000000;
font-weight: 600; font-style: normal; width: 100px; height: 42px;">
<asp:CheckBox ID="chkAge" runat="server" />
Age:
<asp:TextBox ID="txtAgeFrom" runat="server" Height="20px" Width="75px" MaxLength="3"></asp:TextBox>
<asp:FilteredTextBoxExtender ID="filter1" runat="server" TargetControlID="txtAgeFrom"
FilterType="Numbers">
</asp:FilteredTextBoxExtender>
<span style="padding-left: 3px;">To: </span>
<asp:TextBox ID="txtAgeTo" runat="server" Height="20px" Width="75px" MaxLength="3"></asp:TextBox>
<asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="txtAgeTo"
FilterType="Numbers">
</asp:FilteredTextBoxExtender>
</div>
</td>
<td style="height: 20px; width: 190px;">
<div style="font-family: Verdana; font-size: small; color: #000000; font-weight: 600;
font-style: normal; width: 120px; height: 42px;">
<asp:CheckBox ID="chkOccupation" runat="server" />
Occupation:
<asp:DropDownList ID="ddlstOccupation" runat="server" Height="20px" Width="150px">
</asp:DropDownList>
</div>
</td>
<td style="height: 20px; width: 190px;">
<div style="font-family: Verdana; font-size: small; color: #000000; font-weight: 600;
font-style: normal;width: 100px; height: 42px;">
<asp:CheckBox ID="chkGender" runat="server" />
Gender:
<select id="ddlstGender" runat="server" height="20px" width="100px">
<option value="male" selected="selected">MALE</option>
<option value="female">FEMALE</option>
</select>
</div>
</td>
</tr>
<tr>
<td style="height: 20px; width: 190px;">
<div class="left" style="font-family: Verdana; font-size: small; color: #000000;
font-weight: 600; font-style: normal; width: 600px; height: 42px;">
<asp:CheckBox ID="chkBloodGroup" runat="server" />
Blood group:
<br />
<asp:CheckBoxList ID="chkLstBlood" runat="server" RepeatDirection="Horizontal" Style="width: 60%;
margin-left: 25px;">
<asp:ListItem Value="0">All</asp:ListItem>
<asp:ListItem Value="A+ve">A+ve</asp:ListItem>
<asp:ListItem Value="A-ve">A-ve</asp:ListItem>
<asp:ListItem Value="AB+ve">AB+ve</asp:ListItem>
<asp:ListItem Value="AB-ve">AB-ve</asp:ListItem>
<asp:ListItem Value="B+ve">B+ve</asp:ListItem>
<asp:ListItem Value="B-ve">B-ve</asp:ListItem>
<asp:ListItem Value="O-ve">O-ve</asp:ListItem>
<asp:ListItem Value="O+ve">O+ve</asp:ListItem>
</asp:CheckBoxList>
</div>
</td>
</tr>
<tr>
<td style="height: 20px; width: 190px;">
<div style="font-family: Verdana; font-size: small; color: #000000; font-weight: 600;
font-style: normal; width: 100px; height: 42px;">
<asp:CheckBox ID="chkArea" runat="server" />
Area:
<asp:DropDownList ID="ddlstArea" runat="server" Height="20px" Width="150px">
</asp:DropDownList>
</div>
</td>
<td style="height: 20px; width: 190px;">
<div style="font-family: Verdana; font-size: small; color: #000000; font-weight: 600;
font-style: normal; width: 130px; height: 42px;">
<asp:CheckBox ID="chkDia" runat="server" />
Diabetologist:
<asp:DropDownList ID="ddlstDia" runat="server" Height="20px" Width="170px">
</asp:DropDownList>
</div>
</td>
<td style="height: 20px; width: 190px;">
<div style="font-family: Verdana; font-size: small; color: #000000; font-weight: 600;
font-style: normal; width: 140px; height: 42px;">
<asp:CheckBox ID="chkServiceAvailed" runat="server" />
Service availed:
<asp:DropDownList ID="ddlstServiceAvailed" runat="server" Height="20px" Width="180px">
</asp:DropDownList>
</div>
</td>
<td style="height: 20px; width: 190px;">
<div style="font-family: Verdana; font-size: small; color: #000000; font-weight: 600;
font-style: normal; width: 160px; height: 42px;">
<asp:CheckBox ID="chkClinicalAssis" runat="server" />
Clinical Assistant:
<asp:DropDownList ID="ddlstClinicalAssistant" runat="server" Height="20px" Width="130px">
</asp:DropDownList>
</div>
</td>
</tr>
</table>
</Content>
</ajaxToolkit:AccordionPane>
</Panes>
</asp:Accordion>
</div>

Thank You,

Error with GridView

$
0
0

Hi.

I have a WebForm with a single form with a buttons the accept and cancel. Then, I have a GridView to display info related with de before form. And to the end, I have a webusercontrol to used to ModalPopupExtender to display messages related with the event to the buttons.

If the GridView is empy or this isn`t initialized, the webForm work good. But, if the GridView have rows the webForm show this error:

0x800a139e - javascript runtime error: Sys.InvalidOperationException: Two components with the same id 'MainContent_wucMensajes_mpeMensaje' can't be added to the application.

mpeMensaje is the ModalPopupExtender and wucMensajes is the WebUserControl. I use Visual Studio 2012.

Thank you.

HTML Editor Extender Customize Toolbar Styles

$
0
0

I'm trying to customize the Toolbar
- Have 2 toolbars showing at the top not just autowrap the 1 toolbar. 
- Increase Padding around the buttons. 
- If possible make the buttons bigger.  (They are so tiny I work with OLD people who have trouble seeing!)

The HTML Editor is defined as this:
<ajaxToolkit:HtmlEditorExtender ID="htmlEditorExtender1" TargetControlID="meetingNotesTxt"  runat="server" EnableSanitization="false" >   

I found this and it does change the background color and padding in the text area:
 .ajax__html_editor_extender_texteditorbackground-color:#FFA500padding20px 20px 20px 20px; }

I tried this but it didn't work  from here: http://ajaxtoolkit.net/HTMLEditor/HTMLEditor.aspx
 .ajax_html_editor_extender_toptoolbar{ background-color:#FFA500;padding: 20px 20px20px20px; }

Doesn't work.  Anybody know the css change for the toolbar?

JS

 

 

ListSearchExtender - space bar issue

$
0
0

Hello;

Im using a ListSearchExtender for a list of cities in a given state. If the state is CA, the list contains several listitems made of two words, like "San Andreas", "San Bernardino", "San Diego".

The issue i'm encountering is when the user types the city name. while typying "san" everythign is fine, the filter works nicelly. When user hits the spacebar, the dropdown pops (similar as if it was clicked).

My question: how can i avoid the POP feature when hitting the spacebar?

Any help is appreciated.

Viewing all 5678 articles
Browse latest View live




Latest Images