25 new messages in 17 topics - digest [9 May 2008]




Today's topics:
== 1 of 1 ==
Date: Thurs, May 8 2008 11:25 am
From: pativ


I'm getting an Default Web Server Error  Http 500.0 - can anyone help me?
"Juan T. Llibre" wrote:

> re:
> !> I installed IIS 6.0 on my Windows Vista Home Premium
>
> Bad move...
>
> To install IIS7 on Vista Home Premium, follow these instructions :
>
> http://technet2.microsoft.com/windowsserver2008/en/library/86026b03-18b0-4c42-9884-5af83226e2bd1033.mspx?mfr=true
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ======================================
> "DennisX" <DennisX@discussions.microsoft.com> wrote in message
> news:9886CA43-814A-499D-B688-D7C681331EA4@microsoft.com...
> >
> >
> > "Steven Spits" wrote:
> >
> >> "Juan T. Llibre" wrote:
> >>
> >> > The original question was whether IIS could be *installed* on Vista Home
> >> > Premium.
> >> > IIS, and all of its features, *can* be installed.
> >> >
> >> > Some features may, or may not, work in specific OS's, though.
> >>
> >> Thank you, you made it clear for me.
> >>
> >> Steven
> >>
> >> - - -
> >>
> >>
> >>
> > I installed IIS 6.0 on my Windows Vista Home Premium and I cannot use CSS or
> > User Controls. I would install 7.0, but I don't know how or where to enter
> > the script that gets the full install.
>
>
>





==============================================================================
TOPIC: Use class ... why is not available?
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/1137f4c408c684a8?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, May 8 2008 11:47 am
From: shapper


On May 8, 6:25 pm, "Juan T. Llibre" <nomailrepl...@nowhere.com> wrote:
> re:
> !> The problem is when I create classes in App_Folder they don't
> !> seem to be accessible to ASPX pages as it is usual in Web Site.
>
> !> The only solution I found was to make all classes "Build: Compile"
> !> and rename the App_Code folder to New_App_Code.
>
> Have you tried putting all your classes in the App_Code folder, instead of in your App_Folder folder ?
>
> ASP.NET will not automatically compile classes in application folders,
> but *will* compile classes in source files in the App_Code folder.
>
> Better yet, have you considered compiling your helper classes
> into assemblies and placing the dll's in your app's bin directory ?
>
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en español :http://asp.net.do/foros/
> ======================================
>
> "shapper" <mdmo...@gmail.com> wrote in messagenews:93187d96-3ff0-4157-956f-d6d1bdbc12cc@r66g2000hsg.googlegroups.com...
> > On May 8, 3:13 pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
> >> "shapper" <mdmo...@gmail.com> wrote in message
>
> >>news:811ff1c6-7f0c-4849-96e4-7d55f109b3f7@a23g2000hsc.googlegroups.com...
>
> >> > I added a class but whatever I do the class is not visible to my aspx
> >> > pages or anywhere else.
>
> >> > I then changed the property Build Action in my class from Content to
> >> > Compile. Now it is recognized.
>
> >> > Why do I need to do this?
>
> >> Sounds like something's up with your installation of VS.NET, as classes
> >> (should) have their Build Action property set to Compile by default...
>
> >> --
> >> Mark Rae
> >> ASP.NET MVPhttp://www.markrae.net
>
> > Hi,
>
> > I think the problem is where the classes are being added to.
> > App_Folder or somewhere else.
>
> > I created a Web Application Project.
>
> > When I add a class to App_Folder it VS 2008 makes "Build: Content". If
> > I add the class somewhere else it says "Build: Compile".
>
> > The problem is when I create classes in App_Folder they don't seem to
> > be accessible to ASPX pages as it is usual in Web Site.
>
> > When I changed them "Build: Compile" then I am able to build the
> > solution with no errors but when I preview an ASPX pages I get errors
> > everywhere.
>
> > The only solution I found was to make all classes "Build: Compile" and
> > rename the App_Code folder to New_App_Code.
>
> > I think I am missing something.
>
> > Any idea?
>
> > Thanks,
>
> > Miguel

Sorry, when I wrote App_Folder I meant App_Code ... and that is the
strange problem!

Thanks,
Miguel




== 2 of 2 ==
Date: Thurs, May 8 2008 11:47 am
From: shapper


On May 8, 6:25 pm, "Juan T. Llibre" <nomailrepl...@nowhere.com> wrote:
> re:
> !> The problem is when I create classes in App_Folder they don't
> !> seem to be accessible to ASPX pages as it is usual in Web Site.
>
> !> The only solution I found was to make all classes "Build: Compile"
> !> and rename the App_Code folder to New_App_Code.
>
> Have you tried putting all your classes in the App_Code folder, instead of in your App_Folder folder ?
>
> ASP.NET will not automatically compile classes in application folders,
> but *will* compile classes in source files in the App_Code folder.
>
> Better yet, have you considered compiling your helper classes
> into assemblies and placing the dll's in your app's bin directory ?
>
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en español :http://asp.net.do/foros/
> ======================================
>
> "shapper" <mdmo...@gmail.com> wrote in messagenews:93187d96-3ff0-4157-956f-d6d1bdbc12cc@r66g2000hsg.googlegroups.com...
> > On May 8, 3:13 pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
> >> "shapper" <mdmo...@gmail.com> wrote in message
>
> >>news:811ff1c6-7f0c-4849-96e4-7d55f109b3f7@a23g2000hsc.googlegroups.com...
>
> >> > I added a class but whatever I do the class is not visible to my aspx
> >> > pages or anywhere else.
>
> >> > I then changed the property Build Action in my class from Content to
> >> > Compile. Now it is recognized.
>
> >> > Why do I need to do this?
>
> >> Sounds like something's up with your installation of VS.NET, as classes
> >> (should) have their Build Action property set to Compile by default...
>
> >> --
> >> Mark Rae
> >> ASP.NET MVPhttp://www.markrae.net
>
> > Hi,
>
> > I think the problem is where the classes are being added to.
> > App_Folder or somewhere else.
>
> > I created a Web Application Project.
>
> > When I add a class to App_Folder it VS 2008 makes "Build: Content". If
> > I add the class somewhere else it says "Build: Compile".
>
> > The problem is when I create classes in App_Folder they don't seem to
> > be accessible to ASPX pages as it is usual in Web Site.
>
> > When I changed them "Build: Compile" then I am able to build the
> > solution with no errors but when I preview an ASPX pages I get errors
> > everywhere.
>
> > The only solution I found was to make all classes "Build: Compile" and
> > rename the App_Code folder to New_App_Code.
>
> > I think I am missing something.
>
> > Any idea?
>
> > Thanks,
>
> > Miguel

Sorry, when I wrote App_Folder I meant App_Code ... and that is the
strange problem!

Thanks,
Miguel





==============================================================================
TOPIC: Could not load file or assembly System.Data.Entity
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/7d3249f626b06611?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, May 8 2008 11:53 am
From: "Steve Wofford"


I am recieving the following. This happens when I moved it from my
development system to our production SBS 2003 w/ latest .net frameworks and
service packs . I developed under XPSP2 and VS2008.

The error is pointing to the Web.Config of my application.

System.Data.Entity was missing from the server, but was on the dev system.
I tried to add, but didnt help:

C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5

Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error Description: An error occurred during the processing of
a configuration file required to service this request. Please review the
specific error details below and modify your configuration file
appropriately.

Parser Error Message: Could not load file or assembly 'System.Data.Entity,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of
its dependencies. The system cannot find the file specified.

Source Error:

Line 47:     <add assembly="System.Xml.Linq, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 48:     <add assembly="System.Security, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 49:     <add assembly="System.Data.Entity, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 50:     <add assembly="System.Data.Entity.Design, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 51:     <add assembly="System.Data.Linq, Version=3.5.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

Source File: D:\Inetpub\wwwroot\GoldmineIntegration\web.config    Line: 49

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System.Data.Entity, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].





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

Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
ASP.NET Version:2.0.50727.1433






== 2 of 2 ==
Date: Thurs, May 8 2008 3:48 pm
From: "Bob Barrows [MVP]"


Steve Wofford wrote:
> I am recieving the following. This happens when I moved it from my
> development system to our production SBS 2003 w/ latest .net

There was no way for you to know it (except maybe by browsing through some
of the previous questions in this newsgroup before posting yours - always a
recommended practice) , but this is a classic asp newsgroup. ASP.Net bears
very little resemblance to classic ASP so, while you may be lucky enough to
find a dotnet-knowledgeable person here who can answer your question, you
can eliminate the luck factor by posting your question to a group where
those dotnet-knowledgeable people hang out. I suggest
microsoft.public.dotnet.framework.aspnet or the forums at www.asp.net.

Oh, wait ... you crossposted ... how many groups? A little beit of everkill
there. Anyways, I'm responding from the inetserver.asp.db group, so if
respondents to this thread could remove that group from the crosspost, it
would be appreciated.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"







==============================================================================
TOPIC: Use library
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/c1666f1c2aef123c?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 11:57 am
From: "Cowboy \(Gregory A. Beamer\)"


They go in the bin as references.

As far as namespace availability, it really depends. If they are controls,
add them to the toolbox and it will automatically register the tags when you
drop them on the page.

One way to decide is to figure how often you use them. If on every page, you
might be best adding the namespace reference in web.config.

In code behind, you can alter the templates to include the library
reference, if this is something you do in every project. Then it really does
not matter.

Hope this helps!

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
"shapper" <mdmoura@gmail.com> wrote in message
news:4050d1b0-8c6a-4f7a-aee4-d08071d81ab7@x35g2000hsb.googlegroups.com...
> Hello,
>
> In a web site application in VS 2008 where should I place third party
> DLL files and what is the best way to make them available, including
> the namespaces, to my web application?
>
> Thanks,
>
> Miguel







==============================================================================
TOPIC: Source code for web applications
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/b5062ec0d1d234b3?hl=en
==============================================================================

== 1 of 4 ==
Date: Thurs, May 8 2008 12:14 pm
From: "Max"


Is it possible for an ASP.net server (like IIS 6) to run web application
without having available the code behind forms in clear ascii? Can I provide
a compiled product to the customer, not an exe file of course, but some dll
compiled by my server ?
I'm asking that because 1. sometimes I am not happy to provide my source
code 2.customer is afraid of their internal security...

Thanks
Max







== 2 of 4 ==
Date: Thurs, May 8 2008 1:04 pm
From: Stan


On 8 May, 20:14, "Max" <mm> wrote:
> Is it possible for an ASP.net server (like IIS 6) to run web application
> without having available the code behind forms in clear ascii? Can I provide
> a compiled product to the customer, not an exe file of course, but some dll
> compiled by my server ?
> I'm asking that because 1. sometimes I am not happy to provide my source
> code 2.customer is afraid of their internal security...
>
> Thanks
> Max

DLL files that reside in the bin directory of the site are not
compiled by the server. They are precompiled on the development
machine using Visual Studio. VS2005 and later have a Publish option
which does this. So the answer is yes you can deploy them pre-
compiled. Make sure that they are in release form not debug which can
lay them open to reverse engineering.

If you are worried about security its worth reading the Microsoft
documentation for guidance on best practices. Beware that some files,
e.g. web.config have to remain in pain text (XML formatted) so avoid
any sensitive stuff there (e.g. use encryption for passwords).

Having said that, there is no need to worry unduly about source code
file or other plain text system file content being freely available to
anyone browsing the site. It isn't. It requires local administrative
access to the web server or special hacking tools for remote access to
get into them. IIS won't touch them.

HTH




== 3 of 4 ==
Date: Thurs, May 8 2008 1:08 pm
From: "Mark Rae [MVP]"


"Max" <mm> wrote in message
news:4823510d$0$29596$4fafbaef@reader1.news.tin.it...

> Is it possible for an ASP.net server (like IIS 6) to run web application
> without having available the code behind forms in clear ascii? Can I
> provide a compiled product to the customer, not an exe file of course, but
> some dll compiled by my server ?

This is one of the many features of Web Deployment Projects:
http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx


--
Mark Rae
ASP.NET MVP
http://www.markrae.net





== 4 of 4 ==
Date: Thurs, May 8 2008 1:12 pm
From: "Teemu Keiski"


Hi,

if you develop ASP.NET application with Visual Studio and using web
application project model, you essentially deploy markup files e.g aspx
(ascx,asmx etc) and dll files to the server, and there's no need to deploy
the code-behind files. Idea is that code-behind is compiled to the dll, and
therefore isn't viewable so directly (to add: you can also obfuscate dlls).

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net



"Max" <mm> wrote in message
news:4823510d$0$29596$4fafbaef@reader1.news.tin.it...
> Is it possible for an ASP.net server (like IIS 6) to run web application
> without having available the code behind forms in clear ascii? Can I
> provide a compiled product to the customer, not an exe file of course, but
> some dll compiled by my server ?
> I'm asking that because 1. sometimes I am not happy to provide my source
> code 2.customer is afraid of their internal security...
>
> Thanks
> Max
>
>
>







==============================================================================
TOPIC: Encrypting Webconfig file values in .Net 1.1 Framework
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/b2ce73f6f38ef6b1?hl=en
==============================================================================

== 1 of 3 ==
Date: Thurs, May 8 2008 12:23 pm
From: madhusrp


Hi,
Could anyone suggest me an idea to encrypt the webconfig file's connection
string in the framework 1.1.

Thank you in Advance
--
Lets Learn and Make All Learn




== 2 of 3 ==
Date: Thurs, May 8 2008 1:04 pm
From: "Mark Rae [MVP]"


"madhusrp" <madhusrp@discussions.microsoft.com> wrote in message
news:35FC91DD-2EF5-4D25-BF8C-DE085B798480@microsoft.com...

>  Could anyone suggest me an idea to encrypt the webconfig file's
> connection
> string in the framework 1.1.

Use any of the built-in methods in the System.Security.Cryptography
namespace:
http://msdn.microsoft.com/en-us/library/system.security.cryptography(VS.71).aspx

I'm curious as to why you need to do this...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net





== 3 of 3 ==
Date: Thurs, May 8 2008 1:09 pm
From: "Teemu Keiski"


Hi,

here's a walkthrough from "Building Secure ASP.NET Applications"

http://msdn.microsoft.com/en-us/library/aa302403.aspx#secnetht08_step3
How To: Use DPAPI (Machine Store) from ASP.NET 1.1

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


"madhusrp" <madhusrp@discussions.microsoft.com> wrote in message
news:35FC91DD-2EF5-4D25-BF8C-DE085B798480@microsoft.com...
> Hi,
>  Could anyone suggest me an idea to encrypt the webconfig file's
> connection
> string in the framework 1.1.
>
> Thank you in Advance
> --
> Lets Learn and Make All Learn







==============================================================================
TOPIC: Thread.CurrentPrincipal.Identity.Name returns "ANONYMOUS LOGON"
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/2be2c5184744f27a?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 12:26 pm
From: "Brian Stoop"


Hi,

I have a .NET 2 Remoting client in an ASP application, pages call various
methods on the TCP channel. The .NET Remoting Server runs as a Windows
Service, "secure"=true in both the Client and Server Remoting interfaces..

But when I call Thread.Current.Principal.Name in the server, it always
returns "NT AUTHORITY\\ANONYMOUS LOGIN".

How can I get the ID of the user that is logged into the ASP application ?


Thanks, B







==============================================================================
TOPIC: how make codefile default
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/1f1123c2b0d606ab?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, May 8 2008 1:16 pm
From: "Cirene"


Usually I like to have my vb code in a seperate file, rather than inline
with the HTML.  I know that the codefile directive is what links the 2
together.

For some reason, all of a sudden my new pages are lacking the CodeFile even
though I check "Place code in separate file".  Is it because they are linked
with a master page?  How can I do this after the fact?

Thanks.






== 2 of 2 ==
Date: Thurs, May 8 2008 4:19 pm
From: "Cirene"


This happens when i create an aspx page form a master page using EXPRESSION
WEB. :(

"Cirene" <cirene@nowhere.com> wrote in message
news:ewrdYhUsIHA.3632@TK2MSFTNGP04.phx.gbl...
> Usually I like to have my vb code in a seperate file, rather than inline
> with the HTML.  I know that the codefile directive is what links the 2
> together.
>
> For some reason, all of a sudden my new pages are lacking the CodeFile
> even though I check "Place code in separate file".  Is it because they are
> linked with a master page?  How can I do this after the fact?
>
> Thanks.
>







==============================================================================
TOPIC: javascript file won't work with .cs file...
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/b3d042edb660c0cd?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 1:25 pm
From: "Matthew Wells"


Hello.  I'm reposting this because my prioe post's subject line was
incorrect.

   I'm developing an asp.net 2.0 project using VS 2005 on XP sp2 with all
the updates.  I have an aspx page with javascript that works fine until I
try to separate the script into a .js file.  I've found that only the script
that is called from events set in the aspx.cs file don't work.  I eliminated
all script except two functions.  One is used with the .cs file and the
other one is not.

First, here's the functino used with the .cs file:
if (!this.IsPostBack)
{

btnFirst.OnClientClick = "return btnFirst_Click()";

}
... the javascript function is...


function btnFirst_Click()

{

alert("This is btnFirst_Click"):

return false;

}

Now the second javascript function is only

function ShowAlert()
{
   alert("This is ShowAlert");
   return false;
}

This function is called from another button - button1 - from the
OnClientClick event which I set in the property page..

When I have all the javascript in the aspx page, it all wokrs, but when I
move it to a .js file, the first function doesn't work, but the second one
does.

I don't want to add all my javascript in rhe .cs file because that would
expose all my code - that's why I'm teying to put it in a .js file.

How can I make all the code work using both methods?

Thanks...

--
Matthew.Wells
Matthew.Wells@FirstByte.net







==============================================================================
TOPIC: sql problem with updating data from a gridview
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/b27dde0c88932342?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 2:15 pm
From: "Chris"


Thanks, it works now

"Aaron Bertrand [SQL Server MVP]" <ten.xoc@dnartreb.noraa> schreef in
bericht news:88ABDF45-EB78-41EC-9558-8EC3A019F450@microsoft.com...
>> Hi, sorry the error is:
>>
>> Incorrect syntax near the keyword 'INNER'
>
> Well, it's valid SQL Server syntax.  Here is a simple repro you can try in
> Management Studio:
>
>
> USE tempdb;
> GO
>
> CREATE TABLE tableA
> (
> mday INT,
> heure INT
> );
>
> CREATE TABLE tableB
> (
> heure INT
> );
> GO
>
> SET NOCOUNT ON;
>
> INSERT tableA SELECT 1,5;
> INSERT tableA SELECT 2,5;
> INSERT tableA SELECT 3,4;
>
> INSERT tableB SELECT 5;
> INSERT tableB SELECT 6;
> GO
>
> SELECT * FROM tableA;
> /*
>    1    5
>    2    5
>    3    4
> */
> GO
>
> DECLARE @mday INT, @range INT;
>
> SELECT @mday = 42, @range = 5;
>
> UPDATE A
> SET A.mday = @mday
> FROM tableA A
> INNER JOIN tableB B
> ON A.heure = B.heure
> WHERE B.heure = @range;
>
> SELECT * FROM tableA;
> GO
> /*
>    42    5
>    42    5
>    3    4
> */
>
> DROP TABLE tableA, tableB;
> GO
>
>
>
> Maybe .NET is doing you a "favor" by lexing against a different set of
> syntax?  Have you considered using stored procedures for data
> modifications, instead of ad hoc SQL?







==============================================================================
TOPIC: problem with e.Row.Cells() of gridview
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/2e9d7c9c829fa9d2?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 2:21 pm
From: "Chris"


Hi,

i want to make the forecolor of values into a gridview red but only when
they equals 'n'.

<asp:GridView ID="GridView1" runat="server"
       DataKeyNames="hour,place" DataSourceID="SqlDataSource1" >
      <Columns>
           <asp:CommandField ShowEditButton="True"/>
           <asp:BoundField DataField="place" HeaderText="place"
ReadOnly="True" />
           <asp:BoundField DataField="hour" HeaderText="hour"
ReadOnly="True" />

           <asp:TemplateField HeaderText="theday">
                   <EditItemTemplate>
              <asp:DropDownList ID="DropDownList1" SelectedValue='<%#
Bind("theday") %>' runat="server">
              <asp:ListItem Text="y" Value="y"></asp:ListItem>
               <asp:ListItem Text="n" Value="n"></asp:ListItem>
              </asp:DropDownList>
                   </EditItemTemplate>
                   <ItemTemplate>
            <asp:Label ID="Label2" runat="server" Text='<%# Bind("theday")
%>'></asp:Label>
                   </ItemTemplate>
               </asp:TemplateField>

     </Columns>
</asp:GridView>


Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound

       If e.Row.RowType = DataControlRowType.DataRow Then
           Dim m As String
           m = e.Row.Cells(3).Text
          If m = "n" Then
               e.Row.Cells(3).ForeColor = Drawing.Color.Red
           End If
      End If
   End Sub

The values are correctly rendered, i can update etc ... but the forecolor
remains black. Is this due to the template?
Thanks for help
Chris







==============================================================================
TOPIC: Problem with session variables
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/9f4219945f0b875b?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 2:23 pm
From: "darrel"


> No, no load balancing, a single Web server and a separate, single ISA
> server
> 2004 on W2003 server.
> I think that as the requested URLs are the same for every user the ISA is
> somehow caching the pages based just on the URL and when another user
> requests the same page from another session, the ISA serves the cached
> page
> instead of forwarding the request to the web server. ... Could this be the
> case, and if so, how could it be prevented?

This issue is that your web server probably just sees one user...the ISA
server. So everyone is sharing the same session variable.

Alas, that's just a guess. hopefully someone that knows for sure can chime
in.

-Darrel







==============================================================================
TOPIC: authenticating to domain
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/6080578380e17448?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 2:33 pm
From: "andy"


How can I retrieve the domain the web user is coming from?  I want to only
give people from a certain domain access to a .aspx page.

Thanks.







==============================================================================
TOPIC: http xml post
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/d2bcfdfc91ccdf4d?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 3:13 pm
From: "CindyH"


Hi

I'm working on a http xml post (request/response).

In my testing - I have been able to create and post xml string/stream and
send response
back.

But now I've been told that I should "code the whole xml payload string as a
single key"

I'm not sure what this means and haven't been able to find anything about
it.

Can anyone help me with this?

Thanks,
Cindy







==============================================================================
TOPIC: Programmatically adding a css style to a web content form
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/20bf147fb0837f73?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 3:20 pm
From: Stan


> ...  and I am having trouble figuring out
> how to add all the desired css properties to a
> System.Web.UI.WebControls.Style object. Can anyone help me? Thanks.


The "Style" property of a web server control is actually a collection
not a single object (really ought to be named "Styles"). So you use
the Add method. CssStyleCollections are actually a list of key/value
pairs where the key is the attribute and the value the value. For
example:

Suppose you have a label control where you want to set the styles
programmatically:

       Label1.Style.Add("Color", "Blue");
       Label1.Style.Add("font-size", "2em");

will make the text quite large and blue.

HTH






==============================================================================
TOPIC: When does a Bound Control DataBind?
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/cd36393077dd4c66?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 3:59 pm
From: "Jonathan Wood"


I have a databound dropdownlist control. Based on some other criteria, I
need to specify the selected item in my pages Load event.

The problem is that, in my load event, the control does not yet have any
data. I've found I can call DataBind() on that control and then it works
okay. However, this has me wondering where the control normally databinds,
and if me doing it manually would actually introduce the overhead of having
the control databind twice.

Can anyone answer these questions?

1. Does a control know it's been databound such that it will not repeat the
process unecessarily?

2. Is there a better way to specify the selected value of a control that has
not yet databound?

Thanks!

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com






==============================================================================
TOPIC: Redundant LoadFrom()s in a WCF service running in different
environments
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/648f3cf651454785?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, May 8 2008 4:19 pm
From: "Chris Bordeman"


OK, I have a WCF service which might run under IIS, might also run in
different environments as well.  It loads assemblies from disk using
LoadFrom().

As I understand it, IIS apps run under a persistent AppDomain which doesn't
unload between requests.

Does this mean I don't have to keep reloading the assembly?  How can I
detect whether the assembly needs to be reloaded?




No comments: