Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Dave #1
"Invalid FORMATETC stucture" when dragging a custom Gridview onto
I created a simple custom control inherited from a GridView as a test...
using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
namespace CustomControls
{
class CustomGridView : GridView
{
public string GetSomeValue()
{
return "Hello from custom control!";
}
}
}
The control appears in my toolbox of my web application but when I try to
drag it onto my webform, I get the error message.
Dave Guest
-
the error "invalid plugin detected. Adobe Reader will quit"
I have gotten the RIKLA from Adobe. And I use the example code BasicPlugin(you can download it from Adobe wetsite) as my plug_in, then, I made the... -
"Must declare the variable '@…..'." in GridView/DatailsView with M
I am testing ASP.NET 2.0 with MS SQL 2000. I get server error: "Exception Details: System.Data.SqlClient.SqlException: Must declare the variable... -
"MPS parser unable to parse file" when dragging images from Safari to AI10?
I'm trying to drag an image from Safari to AI10, but get the message "The MPS parser is unable to parse the file". What does this mean? I can do the... -
"viewstate is invalid for this page and might be corrupted" - why does worker process recycling cause this?
Hi There, I have posted something previously regarding this issue, but I think I have some more concise questions to ask, and would like to get... -
"sendmail_from" not set in php.ini or custom "From:" header missing
Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 14 Message-ID:... -
Alessandro Zifiglio #2
Re: "Invalid FORMATETC stucture" when dragging a custom Gridview onto
hi, start with making your class public, by default its private now you
should be able to drag and drop it on your webform. By default, your class
is declared 'internal' when an access modifier is not explicitly defined.
Regards,
Alessandro Zifiglio
[url]http://www.AsyncUI.net[/url]
"Dave" <Dave@discussions.microsoft.com> ha scritto nel messaggio
news:E4535969-C724-4ACA-9564-2C767265D32E@microsoft.com...>I created a simple custom control inherited from a GridView as a test...
>
> using System;
> using System.Collections.Generic;
> using System.Text;
> using System.Web.UI.WebControls;
>
> namespace CustomControls
> {
> class CustomGridView : GridView
> {
> public string GetSomeValue()
> {
> return "Hello from custom control!";
> }
> }
> }
>
> The control appears in my toolbox of my web application but when I try to
> drag it onto my webform, I get the error message.
>
Alessandro Zifiglio Guest
-
Alessandro Zifiglio #3
Re: "Invalid FORMATETC stucture" when dragging a custom Gridview onto
oops, i have a typo in the statement i made earlier. i had said, by default
the access modifier for a class is "private", i meant to say "internal".
Apologies.
Regards,
Alessandro Zifiglio
[url]http://www.AsyncUI.net[/url]
"Alessandro Zifiglio" <AlessandroZifiglio @ -h-o-t-m-a-i-l-c-o-m> ha scritto
nel messaggio news:%23iCr9FArGHA.4932@TK2MSFTNGP05.phx.gbl...> hi, start with making your class public, by default its private now you
> should be able to drag and drop it on your webform. By default, your class
> is declared 'internal' when an access modifier is not explicitly defined.
> Regards,
> Alessandro Zifiglio
> [url]http://www.AsyncUI.net[/url]
>
> "Dave" <Dave@discussions.microsoft.com> ha scritto nel messaggio
> news:E4535969-C724-4ACA-9564-2C767265D32E@microsoft.com...>>>I created a simple custom control inherited from a GridView as a test...
>>
>> using System;
>> using System.Collections.Generic;
>> using System.Text;
>> using System.Web.UI.WebControls;
>>
>> namespace CustomControls
>> {
>> class CustomGridView : GridView
>> {
>> public string GetSomeValue()
>> {
>> return "Hello from custom control!";
>> }
>> }
>> }
>>
>> The control appears in my toolbox of my web application but when I try to
>> drag it onto my webform, I get the error message.
>>
>
Alessandro Zifiglio Guest
-
Dave #4
Re: "Invalid FORMATETC stucture" when dragging a custom Gridview o
Alessandro,
Thanks! that got me past the error. However, maybe you can help me with a
new one.
When I drag and drop the control, I now get "Error Creating Control Unknown
server tag" in the designer. When I try to compile in VS I get:
Element 'MyGridView' is not a known element. This can occur if there is a
compilation error in the Web site.
My code is:
<%@ Register Assembly="CustomControls" Namespace="MyCustomControls"
TagPrefix="cc1" %>
<cc1:MyGridView id="MyGridView1" runat="server">
</cc1:MyGridView>
"Alessandro Zifiglio" wrote:
> oops, i have a typo in the statement i made earlier. i had said, by default
> the access modifier for a class is "private", i meant to say "internal".
> Apologies.
> Regards,
> Alessandro Zifiglio
> [url]http://www.AsyncUI.net[/url]
>
> "Alessandro Zifiglio" <AlessandroZifiglio @ -h-o-t-m-a-i-l-c-o-m> ha scritto
> nel messaggio news:%23iCr9FArGHA.4932@TK2MSFTNGP05.phx.gbl...>> > hi, start with making your class public, by default its private now you
> > should be able to drag and drop it on your webform. By default, your class
> > is declared 'internal' when an access modifier is not explicitly defined.
> > Regards,
> > Alessandro Zifiglio
> > [url]http://www.AsyncUI.net[/url]
> >
> > "Dave" <Dave@discussions.microsoft.com> ha scritto nel messaggio
> > news:E4535969-C724-4ACA-9564-2C767265D32E@microsoft.com...> >> >>I created a simple custom control inherited from a GridView as a test...
> >>
> >> using System;
> >> using System.Collections.Generic;
> >> using System.Text;
> >> using System.Web.UI.WebControls;
> >>
> >> namespace CustomControls
> >> {
> >> class CustomGridView : GridView
> >> {
> >> public string GetSomeValue()
> >> {
> >> return "Hello from custom control!";
> >> }
> >> }
> >> }
> >>
> >> The control appears in my toolbox of my web application but when I try to
> >> drag it onto my webform, I get the error message.
> >>
> >
>
>Dave Guest
-
Alessandro Zifiglio #5
Re: "Invalid FORMATETC stucture" when dragging a custom Gridview o
Dave, for me, it works well in the designer when i drag and drop =P
The same code you pasted, after changing the access modifier to public, that
is :-)
So, i dont know what you did to get this error. From the vs.net menu Try to
do a build - clean solution in the solution that is hosting your custom
control. And with your custom control as the active project got to the menu
again and this time do a build - clean "your custom control project". Try
rebuilding the project, go back to your solution hosting the control and
drag and drop it from the toolbox, hoping that this might have fixed it.
Donno what else to suggest since your code example works well for me =P
Regards,
Alessandro Zifiglio
[url]http://www.AsyncUI.net[/url]
"Dave" <Dave@discussions.microsoft.com> ha scritto nel messaggio
news:95AEE0B5-4DEB-4363-8D20-206B1FACA74A@microsoft.com...> Alessandro,
>
> Thanks! that got me past the error. However, maybe you can help me with a
> new one.
>
> When I drag and drop the control, I now get "Error Creating Control
> Unknown
> server tag" in the designer. When I try to compile in VS I get:
>
> Element 'MyGridView' is not a known element. This can occur if there is a
> compilation error in the Web site.
>
> My code is:
>
> <%@ Register Assembly="CustomControls" Namespace="MyCustomControls"
> TagPrefix="cc1" %>
>
> <cc1:MyGridView id="MyGridView1" runat="server">
> </cc1:MyGridView>
>
> "Alessandro Zifiglio" wrote:
>>> oops, i have a typo in the statement i made earlier. i had said, by
>> default
>> the access modifier for a class is "private", i meant to say "internal".
>> Apologies.
>> Regards,
>> Alessandro Zifiglio
>> [url]http://www.AsyncUI.net[/url]
>>
>> "Alessandro Zifiglio" <AlessandroZifiglio @ -h-o-t-m-a-i-l-c-o-m> ha
>> scritto
>> nel messaggio news:%23iCr9FArGHA.4932@TK2MSFTNGP05.phx.gbl...>>>> > hi, start with making your class public, by default its private now you
>> > should be able to drag and drop it on your webform. By default, your
>> > class
>> > is declared 'internal' when an access modifier is not explicitly
>> > defined.
>> > Regards,
>> > Alessandro Zifiglio
>> > [url]http://www.AsyncUI.net[/url]
>> >
>> > "Dave" <Dave@discussions.microsoft.com> ha scritto nel messaggio
>> > news:E4535969-C724-4ACA-9564-2C767265D32E@microsoft.com...
>> >>I created a simple custom control inherited from a GridView as a
>> >>test...
>> >>
>> >> using System;
>> >> using System.Collections.Generic;
>> >> using System.Text;
>> >> using System.Web.UI.WebControls;
>> >>
>> >> namespace CustomControls
>> >> {
>> >> class CustomGridView : GridView
>> >> {
>> >> public string GetSomeValue()
>> >> {
>> >> return "Hello from custom control!";
>> >> }
>> >> }
>> >> }
>> >>
>> >> The control appears in my toolbox of my web application but when I try
>> >> to
>> >> drag it onto my webform, I get the error message.
>> >>
>> >
>> >
>>
>>
Alessandro Zifiglio Guest



Reply With Quote

