Showing posts with label extensions. Show all posts
Showing posts with label extensions. Show all posts

Wednesday, March 28, 2012

Sytem.Drawing.ToolboxBitmapAttribute

I have a simple page that uses the UpdatePanel and runs fine locally, but when uploaded to a Windows 2003 server with .NET 2.0 and AJAX Extensions 1.0 installed I get the following error:

"The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception."

As far as I understand it, that part of the framework is for Windows Forms. This is an ASP.NET website. Any ideas?

Ashiki:

"The type initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception."

As far as I understand it, that part of the framework is for Windows Forms. This is an ASP.NET website. Any ideas?

The ToolboxBitmapAttribute is used for all ServerControls with an UI to show an icon in the VS ToolBox. Maybe it helps to register the System.Web.Extensions.Design.dll in the web.config on youre Server because the UpdatePanel has a reverence in his Attributes to the resources in this assembly. Reflector shows the classdeffinition as follows.

[

Designer("System.Web.UI.Design.UpdatePanelDesigner, System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"),ToolboxBitmap(typeof(EmbeddedResourceFinder),"System.Web.Resources.UpdatePanel.bmp"),DefaultProperty("Triggers"),ParseChildren(true),PersistChildren(false),AspNetHostingPermission(SecurityAction.LinkDemand,Level=AspNetHostingPermissionLevel.Minimal),AspNetHostingPermission(SecurityAction.InheritanceDemand,Level=AspNetHostingPermissionLevel.Minimal)]

Hope that helps


I see - the web.config automatically generated by VS for an AJAX site has this already in the web.config:

<

assemblies>

<

addassembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

assemblies>

I'd never noticed that before, and I guess its there for the reason you give. I've tried adding a reference for System.Web.Extensions.Design as well, just in case, but I still get the same error on the server.


In youre first posting you write: "Thetype initializer for 'System.Drawing.ToolboxBitmapAttribute' threw an exception"!

If it possible, debug the App on the Server to see where exactly the Exception is thrown.

I think the Exception is thrown on this point:ToolboxBitmap(typeof(EmbeddedResourceFinder),

If so, you see more Information in the stack.

Hope that helps.


I can run the website from VS installed on the server and there are no errors at all - it runs fine. When I access the site externally from a browser though I still get the error. Is it a permissions thing?

Well, after many trial and error attempts at a fix I finally uninstalled AJAX Extensions, installed SP2 for Windows 2003, deleted the website from IIS, re-installed AJAX, recreated the website and now its all running OK.


Hello, I have the same error since 2 days on my server. I have a dropdown list .

http://www.laposturologie.com/testbug.aspx

Pleaaaaaase help


I never found out what that error message means, but once I had done the uninstall and re-install as in my post above I've never seen the error again.


godaddy don't want to help me about that error

they told me it is in my code...there's nothing wrong in my code because i have changed nothing and then this error came up.

u can see the page :

http://www.carteinter.com/testbug.aspx

this error happens only when there is a gridview and an sql datasource

u can see the working page

http://www.carteinter.com/testbug.aspx


mistake in last post

the working page is

http://www.carteinter.com/Main.aspx

the page not working is

http://www.carteinter.com/testbug.aspx


I'm having this problem as well. It's only on the host and it happens with both a GridView and a DataList. I'm using an ObjectDataSource instead of a SQLDataSource, but it seems like it's the GridView (not the data source) that's causing the grief. I've removed everything else that could be causing this problem. I just have a class with a static method that gets some rows from the DB and puts them in a DataSet. I've set this as the SelectMethod for my ObjectDataSource and bound the GridView to the ObjectDataSource.

I get the parser error with this simple page (2 controls, nothing else).

Unfortunately, like others have mentioned - since I am on a host (GoDaddy) I can't just reinstall, reboot, delete temporary IIS files, or reset IIS. I did change things several times so the app got recycled, but I've continued to have problems.

Its pretty clear something to do with the server control is not functioning properly and it would be nice to get a little help from someone at Microsoft. Those of us on external hosts are pretty much stuck here. I can rewrite the code to display all this by hand (using codebehind) but that will take a lot of work.


CHANGE HOST ASAP!!!!!!!!!!!

GODADDY REALLY SUCKS !!

THEY CAN'T FIX A BUG, THERE ARE POOR IN TECHNICAL SUPPORT, THERE ARE SURELY A LOT OF USERS THAT HAVING THIS PROBLEM

IM NOT THE ONLY ONE AS U CAN SEE...

I HAVE CHANGED HOST AND NOW MY WEB SITE WORKS FINE

U CAN TAKE A LOOK :

WWW.CARTEINTER.COM

Saturday, March 24, 2012

Tabcontainer & Tabpanel

I just installed the AJAX Extensions and AJAX ControlToolkit. I'm trying to use the TabContainer and the TabPanel so I can have tabs on my ASP form. Here is my sample:

<ajaxToolkit:TabContainerID="TabContainer1"runat="server"ActiveTabIndex="0"CssClass="ajax__tab_xp">

<ajaxToolkit:TabPanelID="TabPanel1"runat="server"HeaderText="Tab one heading">

<ContentTemplate> Tab 1 Text

<asp:ButtonID="Button1"runat="server"Text="Button"/>

</ContentTemplate>

</ajaxToolkit:TabPanel>

<ajaxToolkit:TabPanelID="TabPanel2"runat="server"HeaderText="Tab two heading"Enabled="false">

<ContentTemplate> Tab 2 Text

<asp:ButtonID="Button2"runat="server"Text="Button"/>

<asp:CheckBoxID="CheckBox1"runat="server"/></ContentTemplate>

</ajaxToolkit:TabPanel>

</ajaxToolkit:TabContainer>

But when i go into Design view all i get is a grey 'TabContainer - TabContainer1' box. I would like to be able to view the tabs and add buttons, labels, textboxes, and pictures into each tab in design mode. Is there a way to do that or another option to look at for tabs in a web application?

We do not have extensive support for tabs in design mode. We do have awork item tracking it though. Currently you will have to customize tabs using the code view.

Are there other kinds of ways to use a tabpanel? For example, writing a seperate .aspx page and display that in each tab? I found you could use IFRAME's but is that the only way to do something like that? There were concerns about using frames that some browsers may block that from working, so is there another option to display multiple .aspx pages in one web window, in a tab panel?

Are there other kinds of tabpanels for asp?

Thanks!


merickson:

Are there other kinds of ways to use a tabpanel? For example, writing a seperate .aspx page and display that in each tab?

I wrapped the desired TabPanel content in a Web User Control. The user control can be edited in both views and the TabPanel simply contains the control, like so:

<ajaxToolkit:TabPanel runat="Server" ID="urlTabPanel" HeaderText="User Control">
<ContentTemplate>
<BaBu:MyUserControl runat="server" />
</ContentTemplate>
</ajaxToolkit:TabPanel>

--

babu