Showing posts with label VB.NET 2005. Show all posts
Showing posts with label VB.NET 2005. Show all posts

Wednesday, July 18, 2007

Web Application Project

After working for a while to get this Converted ASP.NET 2.0 VS.Net 2005 VB.Net 2005 (8.0) Application to completely build, I ran into Parser Error Message: Could not load type '.Global'.

I am searching everywhere and find this refference
http://forums.aspfree.com/net-development-11/parser-error-message-could-not-load-type-17894.html
http://forums.aspfree.com/showpost.php?p=60570&postcount=13
================================================================
March 23rd, 2004, 11:03 AM
manos

Registered User
Join Date: Mar 2004
Location: Canada
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0

I found another answer

--------------------------------------------------------------------------------

Hi, just thought I'd share my answer to this frustrating problem.

Basically what I found was that for some reason, the class names that my .aspx pages where inheriting from were wrong. What happened
was that when checking the project in to source control, I had actually named my solution "Something.Net". This meant that all my
code behind inheritance directives said "Something.Net.class". (i.e. Something.Net._default) This may have been a problem.

When I noticed that, I recreated the solution as just "Something" and copied the files from the old solution. I then had to go in to the .aspx files
and change the page directives so that the pages inherited from Something._default.

After that it worked fine.

Good luck.

==========================================================================

I say to myself, "Oh, )&(^*&%(&*)(>, I remember having to change the application name. So, I open a code file in VS.NET 2005 and type Imports . And sure enough no Global ... then I remember some of my components seem to have dropped a level so I type .. and ther is my GLOBAL.
I open 1) Global.asax in NotePad, 2) change the Inherits=".Global" to Inherits="..Global" 3) Save & Close the file 4) rebuild the project
It worked ...
Now why in the code does my project have a split class set with some classes under and others under .????

And onto other Parse Errors ...

Thursday, May 03, 2007

Nuance - ASP.NET

Nuance - ASP.NET VB.NET 2005 .NET 2.0 GridView Button

Some things are so simple that most people do not think to document them.

For example:
“How do you set a GridView caption a different color then the rest of the grid?”
The simplest way is to set the GridView ForeColor equal to the color you want the caption then set the HeaderStyle and RowStyle ForeColor equal to the default color
So if you wanted a red caption and black text in the column name and rows …

    <asp:gridview id="GridView1" runat="server"
        ...
        caption="Your Caption" forecolor="red">
        <HeaderStyle ForeColor="black" />
        <RowStyle ForeColor="black" />
        <Columns>
        ...

“Close Browser Window From Button Web Control”
Okay, I did find some writing on this.
http://www.getfreesofts.com

Name: Close Browser Window From Button Web Control
Author: Bipin Joshi
Category: ASP.NET / Browsers
HomePage: http://www.dotnetbips.com/articles/fca4c3e0-0008-445d-817d-c8e273348c37.aspx
No. of hits: 5603

HOW TO: Close Browser Window From Button Web Control is a web based tutorial in which author explains the method of closing the browser window with the server side controls, using a button click event control. The author explains the above said procedure with the help of examples and source code. The author concludes this tutorial by suggesting users to use server control instead of client scripts.


Code that closes the window
In the click event handler of button1 write following code:

Private Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    ' perform other server side tasks here
    Response.Write("<script>window.close();</script>")
End Sub