473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Please help: Trouble with AJAX ModalPopupExtender

I had a simple admin form for "Categories"...

Details View: To INSERT new Category
Grid View: To View, Edit and Delete all Categories

I decided to put the INSERT Details View inside of a ModalPopupExtender.

PROBLEM 1:
Dragging a ModalPopupExtender control to my webform gives me a gray box in
Design View:
Error Creating Control - ModalPopupExtender1
Unknown server tag 'ajaxToolkit:ModalPopupExtender'.

Any idea why? I registered it at the top of the page (by the way this page
is referencing a master page):
<%@ Page Title="" Language="VB" MasterPageFile="~/membersonly/member.master"
AutoEventWireup="false"
CodeFile="managefaqs.aspx.vb" Inherits="admin_managefaqs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="ajaxToolkit" %>

PROBLEM 2:
The pop up actually comes up. But, when I type in a new category and hit
"insert" on the detailsview I get this error:
"Databinding methods such as Eval(), XPath(), and Bind() can only be used in
the context of a databound control."

It's for this line:
<InsertItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="odsCategories"
DataTextField="Category" DataValueField="CategoryId"
SelectedValue='<%# Bind("FaqCategoryId") %>'>
</asp:DropDownList>
</InsertItemTemplate>

Any idea why? It used to work before I tried putting it in a modal...

QUESTION 3
Any idea how I can refresh the datagrid on the main form after I insert a
new category with the ajax modal?

Thanks
Oct 8 '08 #1
3 6922
I figured out the issues... I'll post it to help others...
PROBLEM 1:
Dragging a ModalPopupExtender control to my webform gives me a gray box in
Design View:
Error Creating Control - ModalPopupExtender1
Unknown server tag 'ajaxToolkit:ModalPopupExtender'.

Any idea why? I registered it at the top of the page (by the way this
page is referencing a master page):
I took the Script Manager OUT OF the Master Page and put it in the page
itself. This fixed the problem.
PROBLEM 2:
The pop up actually comes up. But, when I type in a new category and hit
"insert" on the detailsview I get this error:
"Databinding methods such as Eval(), XPath(), and Bind() can only be used
in the context of a databound control."
This was a problem that was not related to the modal control. DUH! :(
QUESTION 3
Any idea how I can refresh the datagrid on the main form after I insert a
new category with the ajax modal?
It seems to refresh it automatically. This stuff is awesome!
Oct 8 '08 #2
you don't need to move the script manger out of the master. there is a script
manager proxy you can add in the content page if you need a reference to the
master pages.

-- bruce (sqlwork.com)
"Bobby Edward" wrote:
I figured out the issues... I'll post it to help others...
PROBLEM 1:
Dragging a ModalPopupExtender control to my webform gives me a gray box in
Design View:
Error Creating Control - ModalPopupExtender1
Unknown server tag 'ajaxToolkit:ModalPopupExtender'.

Any idea why? I registered it at the top of the page (by the way this
page is referencing a master page):

I took the Script Manager OUT OF the Master Page and put it in the page
itself. This fixed the problem.
PROBLEM 2:
The pop up actually comes up. But, when I type in a new category and hit
"insert" on the detailsview I get this error:
"Databinding methods such as Eval(), XPath(), and Bind() can only be used
in the context of a databound control."

This was a problem that was not related to the modal control. DUH! :(
QUESTION 3
Any idea how I can refresh the datagrid on the main form after I insert a
new category with the ajax modal?

It seems to refresh it automatically. This stuff is awesome!
Oct 8 '08 #3

"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:64**********************************@microsof t.com...
you don't need to move the script manger out of the master. there is a
script
manager proxy you can add in the content page if you need a reference to
the
master pages.

-- bruce (sqlwork.com)
When I did that it fixed the problem. But it later came back. Any idea
why?

Dragging a ModalPopupExtender control to my webform gives me a gray box in
Design View:
Error Creating Control - ModalPopupExtender1
Unknown server tag 'ajaxToolkit:ModalPopupExtender'.
Oct 8 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: xeroxero | last post by:
I am attempting to create a modal pop-up completely in a class that all my .aspx.cs pages inherit from, so any can call DoMyModal() and the yes/no result can be trapped by server-side code. Are...
3
by: Not Me | last post by:
Hey, I'm using the MS AJAX libraries to achieve a modal popup window. Prior to using the toolkit control, I have a gridview and detailsview objects visible on the page.. when the gridview row...
1
by: lundd | last post by:
Hi, I have a scenario where I display a modal popup, and have two button controls that should fire the cancel event for the ModalPopupExtender, however this control can only accept one such Cancel...
2
by: =?Utf-8?B?c3Jpbml2YXM=?= | last post by:
Hi All, I'm having a grid view(GridView1) with a hyperlink column.It's ID is Link1 I want to show a popup on hyperlink click. I'm using ajaxToolkit:ModalPopupExtender for that. But when i'm using...
0
by: SD | last post by:
Hi, I have to use the ModalPopupExtender prgrammatically.. But the next sample doesn't work: ************************** protected Button bt; protected Button bc; protected Button b; protected...
0
by: =?Utf-8?B?QWxCcnVBbg==?= | last post by:
I have a situation in which I need to check for data in either of two fields and display an alert if neither field contains data or if both fields contain data when the user clicks on a View...
3
by: =?Utf-8?B?UnlhbiBTbWl0aA==?= | last post by:
I have a form that has a ModalPopupExtender on it. I have un updatepanel on a panel control that is displayed when an Button (outside of the update panel) is clicked. What I am trying to do is...
4
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I...
0
by: Heron | last post by:
Hi, I have a listbox (lstItems) that I want to populate with the items in another listbox (lstSelected) that's in a modalpopupextender. The update is supposed to happen when I close the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.