Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Please help: Trouble with AJAX ModalPopupExtender

Reply
Thread Tools

Please help: Trouble with AJAX ModalPopupExtender

 
 
Bobby Edward
Guest
Posts: n/a
 
      10-08-2008
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>
<aspropDownList ID="DropDownList1" runat="server"
DataSourceID="odsCategories"
DataTextField="Category" DataValueField="CategoryId"
SelectedValue='<%# Bind("FaqCategoryId") %>'>
</aspropDownList>
</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


 
Reply With Quote
 
 
 
 
Bobby Edward
Guest
Posts: n/a
 
      10-08-2008
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!


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      10-08-2008
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!
>
>
>

 
Reply With Quote
 
Bobby Edward
Guest
Posts: n/a
 
      10-08-2008

"bruce barker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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'.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax Control Toolkit - ModalPopupExtender jondack ASP .Net 0 11-11-2010 02:08 PM
ajax, modalpopupextender/updatepanel Heron ASP .Net 0 05-03-2008 08:15 PM
Ajax TabContainer & ModalPopupExtender mistryman06@gmail.com ASP .Net 1 04-24-2008 05:38 AM
Multiple CancelControlID using AJAX ModalPopupExtender lundd@fihrst.com ASP .Net 1 01-08-2007 04:38 PM
ASP.NET AJAX Modal or ModalPopupExtender in Codebehind? xeroxero ASP .Net 0 12-07-2006 04:57 PM



Advertisments