Showing posts with label following. Show all posts
Showing posts with label following. Show all posts

Saturday, March 31, 2012

Trim and Substring?

I have the following in a dataset --Yeild - 15 Points - (3/6) And to do a calculation I need to pull the 3 position out of the ( ) section. It also has a capability of being something like the following --Yeild - 15 Points - (10/12) instead. Any ideas on how I would go about this?
That is put into a dataset b/c of the following Dataset (which I had a lot of help on b/c I'm still lost on Cast). However I'm just curious if anyone knows How I can pull this # out thanks.
CREATE PROCEDURE dbo.sp_Goals_GetPlantGoalsReviewPage
@dotnet.itags.org.CompanyID nvarchar(2), @dotnet.itags.org.FacilityID nvarchar(2)
AS
DECLARE @dotnet.itags.org.StartMonth int, @dotnet.itags.org.EndMonth int
SELECT @dotnet.itags.org.StartMonth = StartMonth, @dotnet.itags.org.EndMonth = EndMonth FROM Period WHERE PeriodID = dbo.fn_GetCurrentPeriod(@dotnet.itags.org.CompanyID, @dotnet.itags.org.FacilityID)
DECLARE @dotnet.itags.org.Column nvarchar(1000)
DECLARE @dotnet.itags.org.i int
SET @dotnet.itags.org.i = @dotnet.itags.org.StartMonth
SET @dotnet.itags.org.Column = 'Cast(GoalMByte' + Cast(@dotnet.itags.org.i AS nvarchar(100)) + ' AS int)'
WHILE @dotnet.itags.org.i < @dotnet.itags.org.EndMonth
BEGIN
SET @dotnet.itags.org.i = @dotnet.itags.org.i + 1
SET @dotnet.itags.org.Column = @dotnet.itags.org.Column + ' + Cast(GoalMByte' + Cast(@dotnet.itags.org.i AS nvarchar(100)) + ' AS int)'
END
DECLARE @dotnet.itags.org.Query nvarchar(2000)
SET @dotnet.itags.org.Query = ('SELECT [Description] + '' - '' + Cast(Points AS nvarchar(100)) + '' Points - ('' + Cast(' + @dotnet.itags.org.Column + ' AS nvarchar(100)) +''/' + Cast(@dotnet.itags.org.i AS nvarchar(100)) + ')'' AS PlantGoals,Points ,' + @dotnet.itags.org.Column + '/' + Cast(@dotnet.itags.org.i AS nvarchar(100)) + 'AS Fraction
FROM Goals
WHERE CompanyID = ''' + @dotnet.itags.org.CompanyID + ''' AND FacilityID = ''' + @dotnet.itags.org.FacilityID + ''' AND PeriodID = ' + Cast(dbo.fn_GetCurrentPeriod(@dotnet.itags.org.CompanyID, @dotnet.itags.org.FacilityID) AS nvarchar(100)) + ' AND GoalCategory = ''Plant''')
EXEC (@dotnet.itags.org.Query)lets say you create a string that contains the whole string from the DB
dim strAll as string = DBRecord 'Assuming output will be something like: Yeild - 15 Points - (3/6)
Now you can tokenize the string into 3 distinct parts (Yield , 15 points, and (3/6) )
dim strTokens as string() = strAll.split("-"c)
Now to reference the (3/6) portion you can:
dim strFoo as string = strTokens(2)
Now you can split, trim all you like with just that part. :)
Sweet thanks -- I'll give it a shot.
i couldn't tell from your post if the '-' character was a hyphen or a minus sign if its a minus, (ie part of the data) split based on " " the space character
worked great thanks!

Trim string to fit in fixed width Table Cell [Edited by Adec, moderator]

I have the following BIG problemSmile [:)]
The column of datagrid is bind to a database field.
If lenght of string is bigger than the column width i want to trim the string.
No metter if the trimmed word has sense.
I would like to know if anyone knows if there is a way to calculate
string width in pixel in connection to font size used in that particular cell.
You can check the string size and do what you need to with it in your DataGridItemCreated event handler.
that's ok for the position where check, but the problem is how measure the width in pixel of the string:-)
Your getting confused, and making this to complicated. You dont measure strings in pixels, you measure strings in Charatchers, figure out how many charatchers will fit in the column of your datagrid, and trim the string to that amount of chars, I would recomend trimming it to 3 less chars than will fit and appending on a ... so that users know it's been trimmed.
Remember, capital letters take up more space than lower case ones, and different ascii chars can take up a space and a half in some cases purley literally speaking, like the @. symbol.

I would suggest you use sql to get the substring - select substring(myfield, 1, 10) as myfield from my table. This gets the first 10 characters. To add the "..." then select substring(myfield, 1, 7)+'...' as myfield from my table


It is ok, i will follow your indication. But still look for a method like TextWidth("...") to use in application.
Thanks. Best Regards

Wednesday, March 28, 2012

Trouble accesing IIS 5.1

Hiya,

I am trying to open a new ASP.NET Web Application Project using Visual Studio .NET, but it is denied with the following error:

Web Server reported the following error when attempting to create or open the Web Project located at the following URL : "http://localhost/WebApplication1"
'HTTP/1.1 403 Access Forbidden'

I installed everything correctly, first IIS 5.1, then Visual Studio .NET with the update of ASP.NET to 1.1. The error was there even before the update, so I don't think that might be a cause for this problem.

Would appreciate your help guys, as I have to submit the project soon, and really need to get going. Thanks ever so much.To fix IIS mappings for ASP.NET, follow these steps:

1. Click Start -> run -> cmd - ENTER
2. At the command prompt, type the following, and then press ENTER:
"%windir%\Microsoft.NET\Framework\version\aspnet_regiis.exe" -i

In this path, version represents the version number of the .NET Framework that you installed on your server. You need to replace with the actual version number when you type the command.

3. Register the Aspnet_isapi.dll by clicking start -> run
4. In the Open text box, type "regsvr32 %windir%\Microsoft.NET\Framework\version\aspnet_isapi.dll" and then press ENTER
I have re-installed everything, first IIS 5.1, then Visual Studio .NET. Now, it is coming up with the "HTTP/1.1 500 Sever Error"

My initial problem was solved when I followed advice posted below:

http://weblogs.asp.net/jblizzard/archive/2003/07/28/10623.aspx

When I tried to run commands you provided, it returned an error, saying The command is not specified. I suspect it might be because I put 1.1 instead of version in that command. Probably it is not just 1.1 but the full version, which I don't know. Could you advice.

Thanks once again for your kind help.

Trouble converting VB Asc to C# equivalent

Hello,

Does anyone know how to convert the following line of ASP code to C#. I can't work out how to do this as there doesn't seem to be an equivalent to the Asc function.

------

...

For i = lStringLength To 1 Step -1
eText = eText & Chr(Asc((Mid(toEncrypt, i, 1))))
Next

...

------

Thanks for any help

Si.

http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=3828&lngWId=10
Eric
try the code convertor
http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx

fadil1977 wrote:

try the code convertor
http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx


Doubt that would work since C# does not have the Asc function.
Eric
you might be right ....personally i used the convertors but it does not give me 100% accuracy but i try to save the time and correct the errors manually ... and i have no clue about the convertor if it does or not work for the asc function

Monday, March 26, 2012

Trouble getting started with the AjaxControlToolkit

I am trying to start using the AjaxControlToolkit. I followed all the
instructions on the following page:
http://ajax.asp.net/ajaxtoolkit/Walkthrough/Setup.aspx
The only thing I did differently is I did not create my website from the
"ASP.NET AJAX Web Site" template, because my site already exists, and I
don't want to recreate the whole thing. I can see all the "AJAX Extensions"
and "AJAX Control Toolkit" controls listed in Visual Studio .NET 2005's
Toolbox. The specific control that I am working on using right now is the
ConfirmButtonExtender. I can put this control on my page and it does not
complain about it not being available, but when I run the page I recieve a
message saying I must have a ScriptManager. I assumed this meant the one
from the "AJAX Extensions". This is where the problem comes in. When I add a
ScriptManager, I recieve an error saying
Error 27 Type 'System.Web.UI.ScriptManager' is not defined
My code includes the following lines:
<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI"
TagPrefix="asp" %>
<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>
<asp:ScriptManager ID="ScriptManager1"
runat="server"></asp:ScriptManager>
<cc1:confirmbuttonextender id="ConfirmButtonExtender1" runat="server"
targetcontrolid="btnUnique"></cc1:confirmbuttonextender>
All of these lines were created automatically when I added the controls in
Design View (with the exception of the targetcontrolid="btnUnique"
attribute). The examples that were downloaded with the AJAX Control Toolkit
did not seem to help me much. I use VB.NET and Visual Studio .NET 2005 on
Windows XP Professional SP2 with Internet Explorer 6.0. I would appreciate
any help that anyone can give. Thanks.
--
Nathan Sokalski
njsokalski@dotnet.itags.org.hotmail.com
http://www.nathansokalski.com/On Feb 11, 1:58 am, "Nathan Sokalski" <njsokal...@.hotmail.com> wrote:
[snip]
Try http://ajaxwidgets.com instead...
.t
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!
Not to insult your suggestion, but I wanted help fixing the problem I am
having, not help finding another site to download stuff from. As true as it
may be that the most important thing is to find a way to make your site do
what you (or your boss or client or whatever) wants it to, if you always say
"Screw that method, I'll just throw it away and download some other
controls", you'll never really learn how to fix any problems, and will spend
all your time redoing work you've already done. Also, I want to use the AJAX
Control Toolkit from ajax.asp.net because it is the official site for AJAX
on ASP.NET, as well as the most popular.
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Thomas Hansen" <polterguy@.gmail.com> wrote in message
news:1171163206.994527.236940@.p10g2000cwp.googlegroups.com...
> On Feb 11, 1:58 am, "Nathan Sokalski" <njsokal...@.hotmail.com> wrote:
> [snip]
> Try http://ajaxwidgets.com instead...
> .t
> --
> http://ajaxwidgets.com
> Free ASP.NET Ajax Widgets NOW!
>
On Feb 11, 4:30 am, "Nathan Sokalski" <njsokal...@.hotmail.com> wrote:
> Not to insult your suggestion, but I wanted help fixing the problem I am
> having, not help finding another site to download stuff from. As true as i
t
> may be that the most important thing is to find a way to make your site do
> what you (or your boss or client or whatever) wants it to, if you always s
ay
> "Screw that method, I'll just throw it away and download some other
> controls", you'll never really learn how to fix any problems, and will spe
nd
> all your time redoing work you've already done. Also, I want to use the AJ
AX
> Control Toolkit from ajax.asp.net because it is the official site for AJAX
> on ASP.NET, as well as the most popular.
Hmm...
Notes taken!
The reason why I said it though was basically because you will
experience alot of trouble with ASP.NET Ajax...
This is especially true now in the beginning...!!
A friend of mine (which is a SEMI-GOD in programming) spent __THREE__
days figuring out how to create his own
extension widget in the toolkit...
And this was a SIMPLE extension widget!
This was a Button Disable Extension widget...
(Which basically just disabled a button according to if another
control (AutoCompleter) had a "valid" selection or not.)
When I looked at it it was a couple of JavaScript files and maybe
roughly 100 lines of C# code.
All that logic could have been wrapped up in __ONE__ line of code in
Gaia Ajax Widgets!
(In fact it IS too at the IGuyFly sample...)
I might be biased, and maybe not even entitled to have an OPINION
since I am one of the original architects behind Gaia Ajax Widgets,
but
I strongly believe it's the best Ajax framework in existance today for
doing Ajax...
"Telling the truth is not something you choose it's something you
cannot not
choose because it enlightens so much when you have seen it that not
sharing
it would be a crime upon humanity!"
Though I guess it's difficult being taken seriously when you're
"selling" the truth and actually making "money" on it...
That doesn't make the truth "smaller" or "less true" though in any
ways...
;)
.t
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!
"Nathan Sokalski" <njsokalski@.hotmail.com> wrote in message
news:%23Cx0E0YTHHA.480@.TK2MSFTNGP02.phx.gbl...

> Not to insult your suggestion, but I wanted help fixing the problem I am
> having, not help finding another site to download stuff from.
That's pretty much Thomas' reponse to pretty much everything i.e. to
advertise his own product... just have a scan through the newsgroup...
Nathan,
I don't have any issue with people wanting to promote their product
(preferably in their signature line) as long as they answer the question!
When you create an AJAX project, there are certain script definitions wired
up for you. In order to port your existing app "forward" to ASP.NET AJAX,
you'll need to make sure that all these declarations, references, and stuff
in the web.config are transferred to your project.
Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Nathan Sokalski" wrote:

> I am trying to start using the AjaxControlToolkit. I followed all the
> instructions on the following page:
> http://ajax.asp.net/ajaxtoolkit/Walkthrough/Setup.aspx
> The only thing I did differently is I did not create my website from the
> "ASP.NET AJAX Web Site" template, because my site already exists, and I
> don't want to recreate the whole thing. I can see all the "AJAX Extensions
"
> and "AJAX Control Toolkit" controls listed in Visual Studio .NET 2005's
> Toolbox. The specific control that I am working on using right now is the
> ConfirmButtonExtender. I can put this control on my page and it does not
> complain about it not being available, but when I run the page I recieve a
> message saying I must have a ScriptManager. I assumed this meant the one
> from the "AJAX Extensions". This is where the problem comes in. When I add
a
> ScriptManager, I recieve an error saying
> Error 27 Type 'System.Web.UI.ScriptManager' is not defined
> My code includes the following lines:
> <%@. Register Assembly="System.Web.Extensions, Version=1.0.61025.0,
> Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI
"
> TagPrefix="asp" %>
> <%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
> TagPrefix="cc1" %>
> <asp:ScriptManager ID="ScriptManager1"
> runat="server"></asp:ScriptManager>
> <cc1:confirmbuttonextender id="ConfirmButtonExtender1" runat="server"
> targetcontrolid="btnUnique"></cc1:confirmbuttonextender>
> All of these lines were created automatically when I added the controls in
> Design View (with the exception of the targetcontrolid="btnUnique"
> attribute). The examples that were downloaded with the AJAX Control Toolki
t
> did not seem to help me much. I use VB.NET and Visual Studio .NET 2005 on
> Windows XP Professional SP2 with Internet Explorer 6.0. I would appreciate
> any help that anyone can give. Thanks.
> --
> Nathan Sokalski
> njsokalski@.hotmail.com
> http://www.nathansokalski.com/
>
>
I pretty much assumed that there were declarations, references, etc. that I
would need to add or modify, but I need some way to find out exactly what
they all are. Comparing my existing Project to the one created by Web.config
is almost pointless, because that would not be much different than copying
everything, and if I were to do that I may as well just recreate my site
using the Ajax Control Toolkit template.
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.yabbadabbadoo.com> wrote in
message news:AAC7E8AA-2139-4415-BB8D-AAEC532CDC9C@.microsoft.com...
> Nathan,
> I don't have any issue with people wanting to promote their product
> (preferably in their signature line) as long as they answer the question!
> When you create an AJAX project, there are certain script definitions
> wired
> up for you. In order to port your existing app "forward" to ASP.NET AJAX,
> you'll need to make sure that all these declarations, references, and
> stuff
> in the web.config are transferred to your project.
> Peter
> --
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> Short urls & more: http://ittyurl.net
>
>
> "Nathan Sokalski" wrote:
>

Trouble getting started with the AjaxControlToolkit

I am trying to start using the AjaxControlToolkit. I followed all the
instructions on the following page:

http://ajax.asp.net/ajaxtoolkit/Walkthrough/Setup.aspx
The only thing I did differently is I did not create my website from the
"ASP.NET AJAX Web Site" template, because my site already exists, and I
don't want to recreate the whole thing. I can see all the "AJAX Extensions"
and "AJAX Control Toolkit" controls listed in Visual Studio .NET 2005's
Toolbox. The specific control that I am working on using right now is the
ConfirmButtonExtender. I can put this control on my page and it does not
complain about it not being available, but when I run the page I recieve a
message saying I must have a ScriptManager. I assumed this meant the one
from the "AJAX Extensions". This is where the problem comes in. When I add a
ScriptManager, I recieve an error saying

Error 27 Type 'System.Web.UI.ScriptManager' is not defined

My code includes the following lines:

<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI"
TagPrefix="asp" %>
<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>

<asp:ScriptManager ID="ScriptManager1"
runat="server"></asp:ScriptManager>

<cc1:confirmbuttonextender id="ConfirmButtonExtender1" runat="server"
targetcontrolid="btnUnique"></cc1:confirmbuttonextender>

All of these lines were created automatically when I added the controls in
Design View (with the exception of the targetcontrolid="btnUnique"
attribute). The examples that were downloaded with the AJAX Control Toolkit
did not seem to help me much. I use VB.NET and Visual Studio .NET 2005 on
Windows XP Professional SP2 with Internet Explorer 6.0. I would appreciate
any help that anyone can give. Thanks.
--
Nathan Sokalski
njsokalski@dotnet.itags.org.hotmail.com
http://www.nathansokalski.com/On Feb 11, 1:58 am, "Nathan Sokalski" <njsokal...@.hotmail.comwrote:
[snip]

Try http://ajaxwidgets.com instead...

..t

--
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!
Not to insult your suggestion, but I wanted help fixing the problem I am
having, not help finding another site to download stuff from. As true as it
may be that the most important thing is to find a way to make your site do
what you (or your boss or client or whatever) wants it to, if you always say
"Screw that method, I'll just throw it away and download some other
controls", you'll never really learn how to fix any problems, and will spend
all your time redoing work you've already done. Also, I want to use the AJAX
Control Toolkit from ajax.asp.net because it is the official site for AJAX
on ASP.NET, as well as the most popular.
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Thomas Hansen" <polterguy@.gmail.comwrote in message
news:1171163206.994527.236940@.p10g2000cwp.googlegr oups.com...

Quote:

Originally Posted by

On Feb 11, 1:58 am, "Nathan Sokalski" <njsokal...@.hotmail.comwrote:
[snip]
>
Try http://ajaxwidgets.com instead...
>
.t
>
--
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!
>


On Feb 11, 4:30 am, "Nathan Sokalski" <njsokal...@.hotmail.comwrote:

Quote:

Originally Posted by

Not to insult your suggestion, but I wanted help fixing the problem I am
having, not help finding another site to download stuff from. As true as it
may be that the most important thing is to find a way to make your site do
what you (or your boss or client or whatever) wants it to, if you always say
"Screw that method, I'll just throw it away and download some other
controls", you'll never really learn how to fix any problems, and will spend
all your time redoing work you've already done. Also, I want to use the AJAX
Control Toolkit from ajax.asp.net because it is the official site for AJAX
on ASP.NET, as well as the most popular.


Hmm...
Notes taken!

The reason why I said it though was basically because you will
experience alot of trouble with ASP.NET Ajax...
This is especially true now in the beginning...!!
A friend of mine (which is a SEMI-GOD in programming) spent __THREE__
days figuring out how to create his own
extension widget in the toolkit...
And this was a SIMPLE extension widget!
This was a Button Disable Extension widget...
(Which basically just disabled a button according to if another
control (AutoCompleter) had a "valid" selection or not.)

When I looked at it it was a couple of JavaScript files and maybe
roughly 100 lines of C# code.
All that logic could have been wrapped up in __ONE__ line of code in
Gaia Ajax Widgets!
(In fact it IS too at the IGuyFly sample...)

I might be biased, and maybe not even entitled to have an OPINION
since I am one of the original architects behind Gaia Ajax Widgets,
but
I strongly believe it's the best Ajax framework in existance today for
doing Ajax...

"Telling the truth is not something you choose it's something you
cannot not
choose because it enlightens so much when you have seen it that not
sharing
it would be a crime upon humanity!"

Though I guess it's difficult being taken seriously when you're
"selling" the truth and actually making "money" on it...
That doesn't make the truth "smaller" or "less true" though in any
ways...
;)

..t

--
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!
"Nathan Sokalski" <njsokalski@.hotmail.comwrote in message
news:%23Cx0E0YTHHA.480@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Not to insult your suggestion, but I wanted help fixing the problem I am
having, not help finding another site to download stuff from.


That's pretty much Thomas' reponse to pretty much everything i.e. to
advertise his own product... just have a scan through the newsgroup...
Nathan,
I don't have any issue with people wanting to promote their product
(preferably in their signature line) as long as they answer the question!

When you create an AJAX project, there are certain script definitions wired
up for you. In order to port your existing app "forward" to ASP.NET AJAX,
you'll need to make sure that all these declarations, references, and stuff
in the web.config are transferred to your project.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Nathan Sokalski" wrote:

Quote:

Originally Posted by

I am trying to start using the AjaxControlToolkit. I followed all the
instructions on the following page:
>
http://ajax.asp.net/ajaxtoolkit/Walkthrough/Setup.aspx
>
The only thing I did differently is I did not create my website from the
"ASP.NET AJAX Web Site" template, because my site already exists, and I
don't want to recreate the whole thing. I can see all the "AJAX Extensions"
and "AJAX Control Toolkit" controls listed in Visual Studio .NET 2005's
Toolbox. The specific control that I am working on using right now is the
ConfirmButtonExtender. I can put this control on my page and it does not
complain about it not being available, but when I run the page I recieve a
message saying I must have a ScriptManager. I assumed this meant the one
from the "AJAX Extensions". This is where the problem comes in. When I add a
ScriptManager, I recieve an error saying
>
Error 27 Type 'System.Web.UI.ScriptManager' is not defined
>
My code includes the following lines:
>
<%@. Register Assembly="System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI"
TagPrefix="asp" %>
<%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>
>
<asp:ScriptManager ID="ScriptManager1"
runat="server"></asp:ScriptManager>
>
<cc1:confirmbuttonextender id="ConfirmButtonExtender1" runat="server"
targetcontrolid="btnUnique"></cc1:confirmbuttonextender>
>
All of these lines were created automatically when I added the controls in
Design View (with the exception of the targetcontrolid="btnUnique"
attribute). The examples that were downloaded with the AJAX Control Toolkit
did not seem to help me much. I use VB.NET and Visual Studio .NET 2005 on
Windows XP Professional SP2 with Internet Explorer 6.0. I would appreciate
any help that anyone can give. Thanks.
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
>
>
>


I pretty much assumed that there were declarations, references, etc. that I
would need to add or modify, but I need some way to find out exactly what
they all are. Comparing my existing Project to the one created by Web.config
is almost pointless, because that would not be much different than copying
everything, and if I were to do that I may as well just recreate my site
using the Ajax Control Toolkit template.
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.yabbadabbadoo.comwrote in
message news:AAC7E8AA-2139-4415-BB8D-AAEC532CDC9C@.microsoft.com...

Quote:

Originally Posted by

Nathan,
I don't have any issue with people wanting to promote their product
(preferably in their signature line) as long as they answer the question!
>
When you create an AJAX project, there are certain script definitions
wired
up for you. In order to port your existing app "forward" to ASP.NET AJAX,
you'll need to make sure that all these declarations, references, and
stuff
in the web.config are transferred to your project.
Peter
>
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
>
>
>
>
"Nathan Sokalski" wrote:
>

Quote:

Originally Posted by

>I am trying to start using the AjaxControlToolkit. I followed all the
>instructions on the following page:
>>
>http://ajax.asp.net/ajaxtoolkit/Walkthrough/Setup.aspx
>>
>The only thing I did differently is I did not create my website from the
>"ASP.NET AJAX Web Site" template, because my site already exists, and I
>don't want to recreate the whole thing. I can see all the "AJAX
>Extensions"
>and "AJAX Control Toolkit" controls listed in Visual Studio .NET 2005's
>Toolbox. The specific control that I am working on using right now is the
>ConfirmButtonExtender. I can put this control on my page and it does not
>complain about it not being available, but when I run the page I recieve
>a
>message saying I must have a ScriptManager. I assumed this meant the one
>from the "AJAX Extensions". This is where the problem comes in. When I
>add a
>ScriptManager, I recieve an error saying
>>
>Error 27 Type 'System.Web.UI.ScriptManager' is not defined
>>
>My code includes the following lines:
>>
><%@. Register Assembly="System.Web.Extensions, Version=1.0.61025.0,
>Culture=neutral, PublicKeyToken=31bf3856ad364e35"
>Namespace="System.Web.UI"
>TagPrefix="asp" %>
><%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
>TagPrefix="cc1" %>
>>
> <asp:ScriptManager ID="ScriptManager1"
>runat="server"></asp:ScriptManager>
>>
> <cc1:confirmbuttonextender id="ConfirmButtonExtender1" runat="server"
>targetcontrolid="btnUnique"></cc1:confirmbuttonextender>
>>
>All of these lines were created automatically when I added the controls
>in
>Design View (with the exception of the targetcontrolid="btnUnique"
>attribute). The examples that were downloaded with the AJAX Control
>Toolkit
>did not seem to help me much. I use VB.NET and Visual Studio .NET 2005 on
>Windows XP Professional SP2 with Internet Explorer 6.0. I would
>appreciate
>any help that anyone can give. Thanks.
>--
>Nathan Sokalski
>njsokalski@.hotmail.com
>http://www.nathansokalski.com/
>>
>>
>>

Trouble Loading Code Behind Type

Hello,

I'm a new VS.NET user having the following issue.

I've created a new ASP.NET WEb Forms app and have been doing some basic
things with no real problems.

I have decided that the next thing in the development will be a secured area
of the app.

I have determined the Forms Authentication is the way I am going.

I have created a basic login form and modified the Web.config file in my
app's main virtual directory (where all of my files have hitherto resided).
I got this all working, no problem. When a page was requested, the user was
redirected to the login form as expected and when authenticated the
originally requested page was properly display.

Here is where the problem comes up. The site will be a mix of public and
"auth-required" pages. So this basically means that I do not want the
"main" virtual directory of the app secured.

Here is what I did.

First, I disabled the authentication requirement on the main virtual
directory.

Then I created a new virtual directory (under the main app's virtual
directory) and called it "Secure".

I moved the Login.aspx (my custom login form) into the Secure virutal
directory and created an additional blank page in there as well.

I put a new copy of Web.config in the Secure virtual directory and
configured it up for Forms based authentication.

Here is what I expect to happen.

When a page in the app's main virtual directory is requested it loads
for anyone (this works fine).

When a page is initially requested in the Secure virtual directory the
user should be redirected to the Login form (the redirection occurs as
expected)

Here is the problem: The Login.aspx page pops a run time error
complaining that the code behind type cannot be loaded.
Parser Error Message: Could not load type 'RPG.Login'.
The application is named "RPG"
Here is the @dotnet.itags.org.Page
<%@dotnet.itags.org. Page Language="vb" AutoEventWireup="false"
Codebehind="Login.aspx.vb" Inherits="RPG.Login"%
Note: This was not erroring out when page in question was in the app's main
virtual directory. It only occurs for pages (I have tested a "Hello World"
page in the same virtual directory with the same error.

This seems to be some sort of pathing issue, but with the .aspx file and the
.aspx.vb file in the same folder, I don't get the problem. I've tried
changing the reference in the "Inherits" attribute to things like
RPG.Secure.Login but I'm too new to the environment to understand the
Namespace.Class reference and how it is effected by the location of the
files in question.

TIADo you have a file called "RPG.dll" in the /bin folder in the web application root?
Yes. RPG/bin/RPG.dll exists.

Trouble programatically getting form values on PostBack

I am using the following web controls (list shortened to not bore you!):

protected System.Web.UI.WebControls.RadioButtonList rblSymbols;
protected System.Web.UI.WebControls.CheckBox chkPublish;
protected System.Web.UI.WebControls.DropDownList ddlSubject;
protected System.Web.UI.WebControls.TextBox txtEntry;
protected System.Web.UI.WebControls.Button btnSave;
The btnSave_Click(object sender, System.EventArgs e) is properly registered in the InitializeComponent() method. Inside the btnSave_Click() method, I call another function to save to the db which works fine. However, when I attempt to reference the values of those items, they are not set properly. It's as if the IPostBackDataHandler.LoadPostData() method in the Init of the page lifecycle is not being done at all. Any ideas? So far, I have had to result to the following until this is figured out:
YUCK!:
**********************
myObj.Entry = Request["txtEntry"];
Preferred:
**********************
myObj.Entry = txtEntry.Text;
Thanks in advance for any insight you might have.
--ChadIs it possible you've disabled Viewstate at some point?

Peter,
Yes, itIS possible. In fact, I have done just that on several of my controls. Is this the problem? I will try re-enabling. I have read so much on the pros and cons of keeping it turned on. Is is safe to assume that if I wish to program as described above, I need to keep viewstate enabled?
--Chad

Heh... yeah, that could be the problem :)

ViewState is the mechanism by which your controls' properties are persisted across postbacks. If you want to grab myControl.Text, for example, you must have Viewstate enabled.

On the other hand, if you don't mind grabbing values from the Request.Form collection, you can kill Viewstate with impunity.

Cheers,


Peter - thanks for clearing this up for me! Very helpful!

--Chad

Saturday, March 24, 2012

Trouble shooting a simple System.Web.Mail test...

Hello all,

I have the following page on a .NET enabled server which acts as a test mail script. I am attempting to send mail on a much more complex page. When the page executed...nothing happened...no error messages...nothing. So, in an effort to troubleshoot I created this simple test and it seems that I may have found a direction to look in.


<%@dotnet.itags.org. Page Language = "VB" Debug = "True" Explicit = "True" %>
<%@dotnet.itags.org. Import Namespace="System.Web.Mail" %>
<script runat="server">
Sub Page_Load()
Dim mail As New MailMessage()
mail.To = "shane.fowlkes@dotnet.itags.org.drpt.virginia.gov"
mail.From = "webmaster@dotnet.itags.org.drpt.virginia.gov"
mail.Subject = "this is a test email."
mail.BodyFormat = MailFormat.Html
mail.Body = "this is my test email body.< br >< b >this part is in bold< /b >"
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)
End Sub
</script>

The code above gives me the error message "The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for webmaster@dotnet.itags.org.drpt.virginia.gov".

I looked on this helpful site: http://systemwebmail.com/faq/4.3.2.aspx and the second and third bullets on this page seem like they MAY apply. But the trouble is, I don't know if I "have permission to relay through the server" as the pointer tips indicate.

Can anyone shed some light on this or help me out? Thanks in advance!!Sure - here is the jist:

1.) If you site is hosted at www.mySite.com, then by default you should be allowed to send mail to anyone@.mysite.com -- however, if you want to send mail to anyone@.yahoo.com then the server/site must be set up with permissions. You should be able to send a request to your host to set this up (its an smtp setting in IIS)

2.) If its your server then keep in mind that by allowing domains (such as yahoo.com) to have sent, then spammers could potentially use your mail server for their malicious acts.

Let me know if you need further assistance.
Basically what it's telling you is that you're trying to "fake" mail. What's there to stop me from running the same code you posted and send 1,000,000 spam e-mails that look like they came from you?

Try changing localhost to your real mail server you use.
I actually tried that (earlier) and it worked. Thanks everyone.

Thursday, March 22, 2012

Trouble with emailing

I use the following code to email from a form :

Sub sendEmail(Src As Object, E As EventArgs)
Dim msg as New MailMessage()
msg.To = "paul@dotnet.itags.org.mydomain.com"
msg.From = "fred@dotnet.itags.org.mydomain.com"
msg.Subject = "TESTING"
msg.BodyFormat = MailFormat.Html
msg.Body = "TESTING BODY"
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg)
msg = Nothing

end sub

But I keep getting the error message :

"The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for paul@dotnet.itags.org.mydomain.com"

Can anyone tell me what Im doing wrong ?

P.S. I do have the appropriate Include at the top of my page:)

You are getting this error because in smtp server your relay list is empty.

Try this :

1. In IIS right-click on the Default SMTP Virtual Server and select Properties.
2. In the Properties dialog box, selec the Access tab.
3. Click on the Relay button.
4. In the Relay Restrictions dialog box, select the Allow except the list below radio button.

Trouble with Inline If Syntax on asp Image

I have the following asp image, but I'm a little off on the syntax. Could you help. Thanks

<asp:ImageID="RecipeImage"runat="server"Width="176px"Height="115px"ImageUrl='<% (Eval("RecipeID") !=Null) ? "Pictures/recipes/" + Eval("RecipeID") + ".jpg" : "~/Pictures/recipes/NoPhoto2.jpg" %>'/>

why not populate it from the codebehind? IT would be easier... otherwise, wrap a function around it and use that.


I was going to populate it in codebehind based on the querystring id, but i can't because i'm using a pager template and the querystring id is only the id i want one time.

If I use a function, how can I access the Current Id in the FormView?

Trouble with paths in Style Sheets

Consider the following style declaration in a stylesheet:


background-image: url('path/to/image');

That's really all I'm trying to accomplish, but I'm running into difficulties using Visual Studio 2005 on my ASP page.

The problem is that I'm unable to find a good way to refer to the "document root" within those 'url' attributes in the stylesheet. I understand I could use the '~' mark, in an asp.net control, to refer to the document root, but it doesn't work within the 'url' declaration in a stylesheet. Also, simply using '/' doesn't work, since that ends up referring to a directory much higher up in the directory structure, something like my C: drive.


The solutions I've found are to do something like "url(../path/to/images)". That works, but it's ugly, and I'd like to base the paths on the document root, not the directory my stylesheet happens to be in.


I can also include the entire full path to the image directory, relative to my C: drive, but that's even worse, and it won't work once the site is published.

So, is there a "DOCUMENT_ROOT" type of value I can use, or can I set the document root behavior for a given website in Visual Studio?

Thanks.

Have you tried background-image: url('/path/to/image');? I think just having the first slash will take it to the docuemnt root. I could be wrong though.


Having just the first slash doesn't work. I'm not sure where the "/" brings it, but I think it's probably going back to the root of my hard drive. In either case, it's not finding the proper path that way.

It comes down to there being a disconnect between the way web pages function (where "/" should bring you to the root of the site) and the way Visual Studio treats things (where "/" seems to bring it to the filesystem room, instead of the root for that particular website/project.

Is there a way to convince Visual Studio to see "/" as the root for that website, instead of some place further up the directory structure?


this may not be useless to remind that relative pathes in external stylesheet MUST be RELATIVE to the very CSS file itself. (Obvious since the same css file can be linked by many remote pages)therefore url(../path/to/images) is not so ugly ;-)Using absolute path, one can try to concatenate with Request.ApplicationPath & "path/to/image/"...

With Request.ApplicationPath, I think that would only work in a .aspx file, not in a .css file, but I'll see if it does anything.


hum... using aspx for css file would prevent the web designer to edit it. I would rather have the css file next to the image directory and use relative path into the css. the page only needs to know wher the css is.

It turns out all I needed to do was to modify the "Virtual Path" property on the website, to "/" instead of "/MySiteName". The reason I didn't notice this was because I didn't have SP1 installed, and it's not available in the normal, installed version.

Thanks for the suggestions.

Trouble with Response.Cookies

In Visual Studio.NET, I can't get the following code to compile:


public static bool setCookie(string cookiename, string cookievalue)
{
try
{
HttpCookie objCookie = new HttpCookie(cookiename);
Response.Cookies.Add(objCookie);
objCookie.Values.Add(cookiename,cookievalue);
}
catch( Exception e)
{
return false;
}
return true;
}

Visual Studio returns the following build error:

'System.Web.UI.Page.Response' denotes a 'property' where a 'class' was expected.

Any advice would be appreciated.

DougNot sure what the problem is. Have a feeling it is because you have to set the cookie's value before adding it.

As MS put it:
HttpCookie MyCookie = new HttpCookie("LastVisit");
DateTime now = DateTime.Now;

MyCookie.Value = now.ToString();
MyCookie.Expires = now.AddHours(1);

Response.Cookies.Add(MyCookie);

Have a look atthis for examples

HTH

Jagdip
Okay I tried rearranging the code per the suggestion, but still get the same error. Here's the updated code:


public static bool setCookie(string cookiename, string cookievalue)
{
try
{
HttpCookie objCookie = new HttpCookie(cookiename);
objCookie.Value = cookievalue;
Response.Cookies.Add(objCookie);

}
catch( Exception e)
{
return false;
}
return true;
}


try this:
httpcontext.current.response.cookies.add(objcookie)

Tuesday, March 13, 2012

Trouble with translating C# into VB.NET code

Hello, I'm trying to implement a function to create zip files in my application. I am using the following articlehttp://msdn.microsoft.com/msdnmag/issues/03/06/ZipCompression/default.aspx
which describes how to perform zipping with C#.
My application is in VB.NET so I am trying to translate a class thatperforms the zipping into VB code. I have managed to translate theclass except for two lines. The original C# code is as follows. Mytranslated VB code with errors in emphasized red color can be found just beneath the C#code.The error message I get for the two lines are:
"c:\inetpub\wwwroot\TestApplication\Zip.vb(81):'TestApplication.VbZip.EnumerationMethod' is a delegate type. Delegateconstruction permits only a single AddressOf expression as an argumentlist. Often an AddressOf expression can be used instead of a delegateconstruction.".
Can anyone help me translating these two lines?

using System;
using System.Collections;
using java.util;
using java.util.zip;
namespace CsZip
{
public delegate Enumeration EnumerationMethod();
/// <summary>
/// Wraps java enumerators
/// </summary>
public class EnumerationAdapter : IEnumerable
{
private class EnumerationWrapper : IEnumerator
{
private EnumerationMethod m_Method;
private Enumeration m_Wrapped;
private object m_Current;
public EnumerationWrapper(EnumerationMethod method)
{
m_Method = method;
}
// IEnumerator
public object Current
{
get { return m_Current; }
}
public void Reset()
{
m_Wrapped = m_Method();
if (m_Wrapped == null)
throw newInvalidOperationException();
}
public bool MoveNext()
{
if (m_Wrapped == null)
Reset();
bool Result = m_Wrapped.hasMoreElements();
if (Result)
m_Current = m_Wrapped.nextElement();
return Result;
}
}
private EnumerationMethod m_Method;
public EnumerationAdapter(EnumerationMethod method)
{
if (method == null)
throw new ArgumentException();
m_Method = method;
}
// IEnumerable
public IEnumerator GetEnumerator()
{
return new EnumerationWrapper(m_Method);
}
}
public delegate bool FilterEntryMethod(ZipEntry e);
/// <summary>
/// Zip stream utils
/// </summary>
public class ZipUtils
{
public static void CopyStream(java.io.InputStream from, java.io.OutputStream to)
{
sbyte[] buffer = new sbyte[8192];
int got;
while ((got = from.read(buffer, 0, buffer.Length)) > 0)
to.write(buffer, 0, got);
}
public static void ExtractZipFile(ZipFile file, string path, FilterEntryMethod filter)
{
foreach(ZipEntry entry in new EnumerationAdapter(newEnumerationMethod(file.entries)))
{
if (!entry.isDirectory())
{
if ((filter == null ||filter(entry)))
{
java.io.InputStream s = file.getInputStream(entry);
try
{
string fname =System.IO.Path.GetFileName(entry.getName());
string newpath = System.IO.Path.Combine(path,System.IO.Path.GetDirectoryName(entry.getName()));
System.IO.Directory.CreateDirectory(newpath);
java.io.FileOutputStream dest = newjava.io.FileOutputStream(System.IO.Path.Combine(newpath, fname));
try
{
CopyStream(s, dest);
}
finally
{
dest.close();
}
}
finally
{
s.close();
}
}
}
}
}
public static ZipFile CreateEmptyZipFile(string fileName)
{
new ZipOutputStream(new java.io.FileOutputStream(fileName)).close();
return new ZipFile(fileName);
}
public static ZipFileUpdateZipFile(ZipFile file, FilterEntryMethod filter, string[] newFiles)
{
string prev = file.getName();
string tmp = System.IO.Path.GetTempFileName();
ZipOutputStream to = new ZipOutputStream(newjava.io.FileOutputStream(tmp));
try
{
CopyEntries(file, to, filter);
// add entries here
if (newFiles != null)
{
foreach(string f in newFiles)
{
ZipEntry z =new ZipEntry(f.Remove(0, System.IO.Path.GetPathRoot(f).Length));
z.setMethod(ZipEntry.DEFLATED);
to.putNextEntry(z);
try
{
java.io.FileInputStream s = newjava.io.FileInputStream(f);
try
{
CopyStream(s, to);
}
finally
{
s.close();
}
}
finally
{
to.closeEntry();
}
}
}
}
finally
{
to.close();
}
file.close();
// now replace the old file with the new one
System.IO.File.Copy(tmp, prev, true);
System.IO.File.Delete(tmp);
return new ZipFile(prev);
}
public static void CopyEntries(ZipFile from, ZipOutputStream to)
{
CopyEntries(from, to, null);
}
public static void CopyEntries(ZipFile from, ZipOutputStream to, FilterEntryMethod filter)
{
foreach(ZipEntry entry in new EnumerationAdapter(newEnumerationMethod(from.entries)))
{
if (filter == null || filter(entry))
{
java.io.InputStream s =from.getInputStream(entry);
try
{
to.putNextEntry(entry);
try
{
CopyStream(s, to);
}
finally
{
to.closeEntry();
}
}
finally
{
s.close();
}
}
}
}
}
}



VB.NET code:
Imports System
Imports System.Collections
Imports java.util
Imports java.util.zip
Namespace VbZip
Public Delegate Function EnumerationMethod() As Enumeration
Public Class EnumerationAdapter : Implements IEnumerable
Private Class EnumerationWrapper : Implements IEnumerator
Private m_Method As EnumerationMethod
Private m_Wrapped As Enumeration
Private m_Current As Object
Public Sub New(ByVal method As EnumerationMethod)
m_Method = method
End Sub
Public ReadOnly Property Current() As Object _
Implements IEnumerator.Current
Get
Return m_Current
End Get
End Property
Public Sub Reset() _
Implements IEnumerator.Reset
m_Wrapped = m_Method
If m_Wrapped Is Nothing Then
Throw New InvalidOperationException
End If
End Sub
Public Function MoveNext() As Boolean _
Implements IEnumerator.MoveNext
If m_Wrapped Is Nothing Then
Reset()
End If
Dim Result As Boolean = m_Wrapped.hasMoreElements()
If Result Then
m_Current = m_Wrapped.nextElement()
End If
Return Result
End Function
End Class
Private m_Method As EnumerationMethod
Public Function EnumerationAdapter(ByVal method As EnumerationMethod)
If method Is Nothing Then
Throw New ArgumentException
End If
m_Method = method
End Function
'IEnumerable
Public Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
Return New EnumerationWrapper(m_Method)
End Function
End Class
Public Delegate Function FilterEntryMethod(ByVal e As ZipEntry) As Boolean
Public Class ZipUtils
Public Shared Sub CopyStream(ByVal from As java.io.InputStream, _
ByVal tto As java.io.OutputStream)
Dim buffer() As System.SByte = New System.SByte(8192) {}
Dim got As Integer
While (got = from.read(buffer, 0, buffer.Length)) > 0
tto.write(buffer, 0, got)
End While
End Sub
Public Shared SubExtractZipFile(ByVal file As ZipFile, ByVal path As String, ByValfilter As FilterEntryMethod)
ForEach entry As ZipEntry In New EnumerationAdapter(NewEnumerationMethod(file.entries))
If Not entry.isDirectory() Then
If (filter = Nothing Or filter(entry)) Then
Dim s As java.io.InputStream = file.getInputStream(entry)
Try
Dim fname As String = System.IO.Path.GetFileName(entry.getName())
Dim Newpath As String = System.IO.Path.Combine(path,System.IO.Path.GetDirectoryName(entry.getName()))
System.IO.Directory.CreateDirectory(Newpath)
Dim dest As java.io.FileOutputStream = Newjava.io.FileOutputStream(System.IO.Path.Combine(Newpath, fname))
Try
CopyStream(s, dest)
Finally
dest.close()
End Try
Finally
s.close()
End Try
End If
End If
Next
End Sub
Public Shared Function CreateEmptyZipFile(ByVal fileName As String) As ZipFile
Dimzos As New ZipOutputStream(New java.io.FileOutputStream(fileName))
zos.close()
Return New ZipFile(fileName)
End Function
Public Shared FunctionUpdateZipFile(ByVal file As ZipFile, ByVal filter As FilterEntryMethod,_
ByVal newFiles As String())
Dim prev As String = file.getName
Dim tmp As String = System.IO.Path.GetTempFileName
Dimtto As ZipOutputStream = New ZipOutputStream(Newjava.io.FileOutputStream(tmp))
Try
CopyEntries(file, tto, filter)
If Not newFiles Is Nothing Then
For Each f As String In newFiles
Dim z As ZipEntry = New ZipEntry(f.Remove(0,System.IO.Path.GetPathRoot(f).Length))
z.setMethod(ZipEntry.DEFLATED)
tto.putNextEntry(z)
Try
Dim s As New java.io.FileInputStream(f)
Try
CopyStream(s, tto)
Finally
s.close()
End Try
Finally
tto.closeEntry()
End Try
Next
End If
Finally
tto.close()
End Try
file.close()
'now replace the old file with the new one
System.IO.File.Copy(tmp, prev, True)
System.IO.File.Delete(tmp)
Return New ZipFile(prev)
End Function
Public Shared Sub CopyEntries(ByVal from As ZipFile, ByVal tto As ZipOutputStream, _
ByVal filter As FilterEntryMethod)
ForEach entry As ZipEntry In New EnumerationAdapter(NewEnumerationMethod(from.entries))
If filter Is Nothing Or filter(entry) Then
Dim s As java.io.InputStream = from.getInputStream(entry)
Try
tto.putNextEntry(entry)
Try
CopyStream(s, tto)
Finally
tto.closeEntry()
End Try
Finally
s.close()
End Try
End If
Next
End Sub
End Class
End Namespace
try the convertor it is for both languages

http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx
I have tried a different translator before, and have just tried yoursuggestion. However, the results are the same and the conversion doesnot seem to be perfect. It still requires some manual tuning which Ihave done except for the two lines emphasized in red. Anyone here canhelp me out?Smile [:)]

i know it is not perfect but what i do is deal with errors manually other wise you will not be albe to solve the problem... we can help you if you can not solve the error so you deal in that case with few lines of code rather than 100's lines

Well, the error I'm getting is for the two lines emphasizes in red:
c:\inetpub\wwwroot\TestApplication\Zip.vb(81): 'TestApplication.VbZip.EnumerationMethod' is a delegate type. Delegate construction permits only a single AddressOf expression as an argument list. Often an AddressOf expression can be used instead of a delegate construction.".
I don't know too well how to solve this, so any insight is appreciated.

if you specify the code that making the problem we might help you at the mean time look at this if that will help!!
http://abstractvb.com/code.asp?A=1084
http://www.startvbdotnet.com/language/enumeration.aspx

Troubleshooting ASP.NET

when i turn on visual studio.net i got , asp.net project i got thr following message
The specified server is not runnung ASP.NET ...version...
using help i did aspnet_regiis/i
but it does not work

please help
thanks.Well is it saying you are not running ASP.NET version 1.1?

If so make sure you go to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 in the cmd window and run aspnet_regiis.exe -i . That will install version 1.1.