25 new messages in 14 topics - digest


== 1 of 2 ==
Date: Fri, May 9 2008 8:18 pm
From: "Mark Fitzpatrick"


Why not just use what the database has built into it. In this case just pass
the fucntion as one of your values. For example, in SQL Server it would be
GetDate() and used like so:

... @CompanyName, @CompanyLocation, GetDate(), 0)"

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

"Cirene" <cirene@nowhere.com> wrote in message
news:u2adMKksIHA.2064@TK2MSFTNGP05.phx.gbl...
> In my HTML view of my ASPX page how do I use the NOW() function for the
> InsertCommand?   This doesn't seem to work...
>
> Code snippet:
>        <asp:SqlDataSource ID="sdsPress" runat="server"
>            ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
>            DeleteCommand="DELETE FROM [pressReleases] WHERE [Id] = @Id"
>            InsertCommand="INSERT INTO [pressReleases] ([UserId],
> [PressTitle], [PressDescription], [CompanyName], [CompanyLocation],
> [DateAdded], [Flagged]) VALUES (@UserId, @PressTitle, @PressDescription,
> @CompanyName, @CompanyLocation, <% =Date.now() %>, 0)"
>
>
>




== 2 of 2 ==
Date: Sat, May 10 2008 5:07 am
From: "Cirene"


That's a great idea Mark!

"Mark Fitzpatrick" <markfitz@fitzme.com> wrote in message
news:uNNNNyksIHA.5068@TK2MSFTNGP02.phx.gbl...
> Why not just use what the database has built into it. In this case just
> pass the fucntion as one of your values. For example, in SQL Server it
> would be GetDate() and used like so:
>
> ... @CompanyName, @CompanyLocation, GetDate(), 0)"
>
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - Expression
>
> "Cirene" <cirene@nowhere.com> wrote in message
> news:u2adMKksIHA.2064@TK2MSFTNGP05.phx.gbl...
>> In my HTML view of my ASPX page how do I use the NOW() function for the
>> InsertCommand?   This doesn't seem to work...
>>
>> Code snippet:
>>        <asp:SqlDataSource ID="sdsPress" runat="server"
>>            ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
>>            DeleteCommand="DELETE FROM [pressReleases] WHERE [Id] = @Id"
>>            InsertCommand="INSERT INTO [pressReleases] ([UserId],
>> [PressTitle], [PressDescription], [CompanyName], [CompanyLocation],
>> [DateAdded], [Flagged]) VALUES (@UserId, @PressTitle, @PressDescription,
>> @CompanyName, @CompanyLocation, <% =Date.now() %>, 0)"
>>
>>
>>







==============================================================================
TOPIC: Can't use some javascript from a .js file...
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/cd9f04c39d0fb5a9?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 11:06 pm
From: "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"


Teemu is right.
To put it another way, the .js file is run entirely on the client side by
the browser.  The browser doesn't know how to interpret the server side
script you have inserted in your second alert statement.
("<%=LBFacilities.ClientID%>")
Server script like that only works in an ASPX page because that is processed
by the server before it is sent to the browser.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
http://iPhonePlaza.net


"Matthew Wells" <Matthew.Wells@FirstByte.net> wrote in message
news:K8qdnWwGFIUrDbnVnZ2dnUVZ_saknZ2d@comcast.com...
> OK, I've narrowed down the problem.  This works when in the aspx page
>
> <script type="text/javascript" >
> function btnFirst_Click()
> {
> alert("Hello");
> alert(document.getElementById("<%=LBFacilities.ClientID%>").options.length);
> return false;
> }
> </script>
>
> But when I put this in a .js file, I get the first "Hello", but the second
> statement fails.  I've put the
> <script type="text/javascript" src="Facilities.js" ></script>
>
> both on top and at the bottom of the aspx page.  No luck.
>
> How do I get this to work from a .js file?
>
> Thanks.
>
> --
> Matthew.Wells
> Matthew.Wells@FirstByte.net
>






==============================================================================
TOPIC: Breadcrumbs and my menu
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/cbd8f9910e675ad0?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 11:09 pm
From: "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"


You can programmatically adjust which nodes the breadcrumb and menu controls
display at runtime by navigating their object models and node collections
and adding/removing nodes as necessary.
But likely the only way to handle this situation declaratively (purely at
design time) would be to use 2 site maps.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
http://iPhonePlaza.net


<info@listerhome.com> wrote in message
news:f8f03920-5c96-473d-a2c2-77a4c1daa69e@u36g2000prf.googlegroups.com...
> If you make the Breadcrumbs control use the site map, is there a way
> to not show certain things that can be visible in the site map, but
> not in the main navidation menu?
>
> I ask, as I have an item on my menu: Organisations
>
> I click that, and I can edit the Org, or I can select a branch from a
> grid. The bread crumbs should just show, 'Organisations'.
>
> When I select a branch, the breadcrumbs should then read Organisations
>> Branch.
>
> I don't want a user to be able to navidate directly to a branch from
> the main menu. I am new to ASP.net, but I was told that we would need
> 2 site maps. That seems wrong.
>
> Is there a way for this to work?






==============================================================================
TOPIC: how does one limit postback to a small section of screen?
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/b41534b5d6c08beb?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 11:13 pm
From: "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"


Bruce is right that you can do this more efficiently by using only client
side JavaScript.

You are also right that it could be done gracefully with an AJAX
UpdatePanel.  This would be less efficient because it requires a round trip
to the server, but if you fear JavaScript then it would be the simpler
solution for you.  If your app doesn't need to be optimized for scalability
then this solution would likely be sufficient.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
http://iPhonePlaza.net



<COHENMARVIN@lycos.com> wrote in message
news:2320682a-19bb-4fa5-83ae-ae3d2bb15974@k37g2000hsf.googlegroups.com...
>I have a checkbox on my webpage which, if checked, should cause a
> textbox to be enabled (or made visible).  But I find I need to make
> the checkbox have a autopostback of TRUE for this to work.  Is there
> any way, perhaps using Ajax update panels, to have a checkbox cause a
> partial postback of only part of the page?
> Thanks,
> Marvin






==============================================================================
TOPIC: How to hide the real file name in the URL?
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/bf3f64cacf49cf94?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 11:56 pm
From: Michael Nemtsev [MVP]


Hello gnewsgroup,

Why not?! they dont have a big structure.
it's about 10-15 pages

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


g> That's what I thought, but dismissed it bec'z I think it is too
g> troublesome to have to create one folder per file.
g>







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

== 1 of 3 ==
Date: Sat, May 10 2008 12:38 am
From: "Max"


Juan,
you really gave me a huge help. I was unable to find such information on the
web, and I searched a lot before posting.
I've tried, and with a syntax similar to yours, I was able to compile a
application and have a server running it (with web dev express 2005!)
Only one question, it seems necessary to have IIS running on the machine
where it is compiled. A virtual IIS directory is needed. I could not compile
in any way from a physical path to a physical path.
Is that true?

Thanks
Max

"Juan T. Llibre" <nomailreplies@nowhere.com> ha scritto nel messaggio
news:e9dSBXisIHA.1220@TK2MSFTNGP04.phx.gbl...
> re:
> !> Understand that Express version doesn't offer this option. have looked
> for a
> !> "deploy" or "publish" option but in vain, while Enterprise or Pro seem
> to
> !> have it, afa I can read. MS gave us a gift, but without the red staple.
>
> ASP.NET comes with the tools to compile any .NET code that you
> write regardless of the development environment that you prefer to work
> in.
>
> Sample batch file :
>
> set frmwk=Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
> set src=Drive:\vwdsite
> set dest=Drive:\vwdsite\compiled
> del /F /Q Drive:\vwdsite\compiled\*.*
> %frmwk%\aspnet_compiler -v /vwdsite -p %src% %dest% -c
>
> Just substitute your actual boot drive letter anywhere "Drive" appears in
> the batch file.
> After you compile, just upload all the files in Drive:\vwdsite\compiled
>
> Also, you can modify VWD's menu so you can automate
> batch compiling your VWD-developed applications.
>
> See this article for the details on how to do that :
> http://safari.oreilly.com/9780789736659/ch03lev1sec2
>
> More background info on this process is found at :
> http://www.informit.com/articles/article.aspx?p=1073232
>
> As you can see, your gift isn't maimed.
>
>
>
> 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/
> ======================================
> "Max" <mm> wrote in message
> news:4824a1ad$0$29598$4fafbaef@reader1.news.tin.it...
>> Understand that Express version doesn't offer this option. have looked
>> for a "deploy" or "publish" option but in vain,
>> while Enterprise or Pro seem to have it, afa I can read.
>> MS gave us a gift, but without the red staple.
>> Max
>>
>>
>> "Teemu Keiski" <joteke@aspalliance.com> ha scritto nel messaggio
>> news:O1qhcfUsIHA.1436@TK2MSFTNGP05.phx.gbl...
>>> 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
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>






== 2 of 3 ==
Date: Sat, May 10 2008 12:47 am
From: "Max"


Correction.
I was able to compile the application from a physical path to another
physical path (C:\aaaa\ to C:\bbb\)
No IIS or virtual path involved. Really happy with that.
Gift is perfectly maimed, and now you can't look inside!!!!
Thanks again


"Max" <mm> ha scritto nel messaggio
news:4825510e$0$41653$4fafbaef@reader4.news.tin.it...
> Juan,
> you really gave me a huge help. I was unable to find such information on
> the web, and I searched a lot before posting.
> I've tried, and with a syntax similar to yours, I was able to compile a
> application and have a server running it (with web dev express 2005!)
> Only one question, it seems necessary to have IIS running on the machine
> where it is compiled. A virtual IIS directory is needed. I could not
> compile in any way from a physical path to a physical path.
> Is that true?
>
> Thanks
> Max
>
> "Juan T. Llibre" <nomailreplies@nowhere.com> ha scritto nel messaggio
> news:e9dSBXisIHA.1220@TK2MSFTNGP04.phx.gbl...
>> re:
>> !> Understand that Express version doesn't offer this option. have looked
>> for a
>> !> "deploy" or "publish" option but in vain, while Enterprise or Pro seem
>> to
>> !> have it, afa I can read. MS gave us a gift, but without the red
>> staple.
>>
>> ASP.NET comes with the tools to compile any .NET code that you
>> write regardless of the development environment that you prefer to work
>> in.
>>
>> Sample batch file :
>>
>> set frmwk=Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
>> set src=Drive:\vwdsite
>> set dest=Drive:\vwdsite\compiled
>> del /F /Q Drive:\vwdsite\compiled\*.*
>> %frmwk%\aspnet_compiler -v /vwdsite -p %src% %dest% -c
>>
>> Just substitute your actual boot drive letter anywhere "Drive" appears in
>> the batch file.
>> After you compile, just upload all the files in Drive:\vwdsite\compiled
>>
>> Also, you can modify VWD's menu so you can automate
>> batch compiling your VWD-developed applications.
>>
>> See this article for the details on how to do that :
>> http://safari.oreilly.com/9780789736659/ch03lev1sec2
>>
>> More background info on this process is found at :
>> http://www.informit.com/articles/article.aspx?p=1073232
>>
>> As you can see, your gift isn't maimed.
>>
>>
>>
>> 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/
>> ======================================
>> "Max" <mm> wrote in message
>> news:4824a1ad$0$29598$4fafbaef@reader1.news.tin.it...
>>> Understand that Express version doesn't offer this option. have looked
>>> for a "deploy" or "publish" option but in vain,
>>> while Enterprise or Pro seem to have it, afa I can read.
>>> MS gave us a gift, but without the red staple.
>>> Max
>>>
>>>
>>> "Teemu Keiski" <joteke@aspalliance.com> ha scritto nel messaggio
>>> news:O1qhcfUsIHA.1436@TK2MSFTNGP05.phx.gbl...
>>>> 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
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>






== 3 of 3 ==
Date: Sat, May 10 2008 4:26 am
From: "Juan T. Llibre"


re:
!> Really happy with that
!> Thanks again

You're quite welcome, Max. It's great when obstacles can be removed.

I hope you get a zillion hits a day on your site... ;-)




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/
======================================
"Max" <mm> wrote in message news:48255307$0$41664$4fafbaef@reader4.news.tin.it...
> Correction.
> I was able to compile the application from a physical path to another physical path (C:\aaaa\ to C:\bbb\)
> No IIS or virtual path involved. Really happy with that.
> Gift is perfectly maimed, and now you can't look inside!!!!
> Thanks again
>
>
> "Max" <mm> ha scritto nel messaggio news:4825510e$0$41653$4fafbaef@reader4.news.tin.it...
>> Juan,
>> you really gave me a huge help. I was unable to find such information on the web, and I searched a lot before
>> posting.
>> I've tried, and with a syntax similar to yours, I was able to compile a application and have a server running it
>> (with web dev express 2005!)
>> Only one question, it seems necessary to have IIS running on the machine where it is compiled. A virtual IIS
>> directory is needed. I could not compile in any way from a physical path to a physical path.
>> Is that true?
>>
>> Thanks
>> Max
>>
>> "Juan T. Llibre" <nomailreplies@nowhere.com> ha scritto nel messaggio news:e9dSBXisIHA.1220@TK2MSFTNGP04.phx.gbl...
>>> re:
>>> !> Understand that Express version doesn't offer this option. have looked for a
>>> !> "deploy" or "publish" option but in vain, while Enterprise or Pro seem to
>>> !> have it, afa I can read. MS gave us a gift, but without the red staple.
>>>
>>> ASP.NET comes with the tools to compile any .NET code that you
>>> write regardless of the development environment that you prefer to work in.
>>>
>>> Sample batch file :
>>>
>>> set frmwk=Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
>>> set src=Drive:\vwdsite
>>> set dest=Drive:\vwdsite\compiled
>>> del /F /Q Drive:\vwdsite\compiled\*.*
>>> %frmwk%\aspnet_compiler -v /vwdsite -p %src% %dest% -c
>>>
>>> Just substitute your actual boot drive letter anywhere "Drive" appears in the batch file.
>>> After you compile, just upload all the files in Drive:\vwdsite\compiled
>>>
>>> Also, you can modify VWD's menu so you can automate
>>> batch compiling your VWD-developed applications.
>>>
>>> See this article for the details on how to do that :
>>> http://safari.oreilly.com/9780789736659/ch03lev1sec2
>>>
>>> More background info on this process is found at :
>>> http://www.informit.com/articles/article.aspx?p=1073232
>>>
>>> As you can see, your gift isn't maimed.
>>>
>>>
>>>
>>> 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/
>>> ======================================
>>> "Max" <mm> wrote in message news:4824a1ad$0$29598$4fafbaef@reader1.news.tin.it...
>>>> Understand that Express version doesn't offer this option. have looked for a "deploy" or "publish" option but in
>>>> vain,
>>>> while Enterprise or Pro seem to have it, afa I can read.
>>>> MS gave us a gift, but without the red staple.
>>>> Max
>>>>
>>>>
>>>> "Teemu Keiski" <joteke@aspalliance.com> ha scritto nel messaggio news:O1qhcfUsIHA.1436@TK2MSFTNGP05.phx.gbl...
>>>>> 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: Getting the DataKey Value in a GridView
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/6c128794197d573c?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, May 10 2008 1:05 am
From: Manish


Hi,

You can try the following code to implement the same.

Protected Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated
       If e.Row.RowType = DataControlRowType.DataRow Then
           Dim chb As CheckBox = e.Row.Cells(2).FindControl("CheckBox1")
           AddHandler chb.CheckedChanged, AddressOf check_changed
       End If
   End Sub
   Public Sub check_changed(ByVal sender As Object, ByVal e As EventArgs)
       Response.Write(Me.GridView1.DataKeys.Item(CType(CType(sender,
CheckBox).Parent.Parent, GridViewRow).RowIndex).Value)
   End Sub

Regards,
Manish
www.componentone.com

"Wannabe" wrote:

> I have a gridview that has a label field and a checkbox field in it. I have
> the checkbox set to autopost when changed. How can I get the datakey value
> that is assigned to that row when a checkbox is either checked or unchecked?





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

== 1 of 4 ==
Date: Sat, May 10 2008 1:14 am
From: Manish


Hi Danny,

Please make sure that you have ASPNET account read/write rights to your
Temporary ASP.NET files folder.

Regards,
Manish
www.componentone.com


"Danny Ni" wrote:

> Hi,
>
> I need help with the following exceptions, it happens to my dev machine and
> live server every now and then, most of the times they happen after I
> recompile the solution on my dev machine or deploy the new assembly to live
> server.   TIA
>
> Attempted to read or write protected memory. This is often an indication
> that other memory is corrupt.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.AccessViolationException: Attempted to read or
> write protected memory. This is often an indication that other memory is
> corrupt.
>
> Source Error:
>
> [No relevant source lines]
>
> Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fihf.0.cs
> Line: 0
>
> Stack Trace:
>
> [AccessViolationException: Attempted to read or write protected memory. This
> is often an indication that other memory is corrupt.]
>    ASP.global_asax..ctor() in
> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fihf.0.cs:0
>
> [TargetInvocationException: Exception has been thrown by the target of an
> invocation.]
>    System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
> publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle&
> ctor, Boolean& bNeedSecurityCheck) +0
>    System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
> fillCache) +103
>    System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
> skipVisibilityChecks, Boolean fillCache) +268
>    System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
>    System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
> binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
> +1036
>    System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
> Binder binder, Object[] args, CultureInfo culture, Object[]
> activationAttributes) +114
>    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
> appContext, HttpContext context) +197
>    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance() +27
>    System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext
> context) +3460678
>    System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext
> context) +125
>    System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
> context) +99
>    System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350
>
>
>
>
>




== 2 of 4 ==
Date: Sat, May 10 2008 5:00 am
From: Michael Nemtsev [MVP]


Hello Danny,

what's the type of asp.net project on your dev machine - file or IIS?!
Seems that IIS. Have u tried to restart IIS after you build new version of
your assembly and before running site on dev?!

if it doesnt help, try to remove everything from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files\

seems that IIS load your new assembly to others, which were not flushed and
new changed are not correcly used

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


DN> Hi,
DN>
DN> I need help with the following exceptions, it happens to my dev
DN> machine and live server every now and then, most of the times they
DN> happen after I recompile the solution on my dev machine or deploy
DN> the new assembly to live server.   TIA
DN>
DN> Attempted to read or write protected memory. This is often an
DN> indication
DN> that other memory is corrupt.
DN> Description: An unhandled exception occurred during the execution of
DN> the
DN> current web request. Please review the stack trace for more
DN> information
DN> about the error and where it originated in the code.
DN> Exception Details: System.AccessViolationException: Attempted to
DN> read or write protected memory. This is often an indication that
DN> other memory is corrupt.
DN>
DN> Source Error:
DN>
DN> [No relevant source lines]
DN>
DN> Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
DN> ASP.NET
DN> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fih
DN> f.0.cs Line: 0
DN>
DN> Stack Trace:
DN>
DN> [AccessViolationException: Attempted to read or write protected
DN> memory. This
DN> is often an indication that other memory is corrupt.]
DN> ASP.global_asax..ctor() in
DN> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
DN> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fih
DN> f.0.cs:0
DN>
DN> [TargetInvocationException: Exception has been thrown by the target
DN> of an
DN> invocation.]
DN> System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
DN> publicOnly, Boolean noCheck, Boolean& canBeCached,
DN> RuntimeMethodHandle&
DN> ctor, Boolean& bNeedSecurityCheck) +0
DN> System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
DN> fillCache) +103
DN> System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
DN> skipVisibilityChecks, Boolean fillCache) +268
DN> System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
DN> System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
DN> Binder
DN> binder, Object[] args, CultureInfo culture, Object[]
DN> activationAttributes)
DN> +1036
DN> System.Activator.CreateInstance(Type type, BindingFlags
DN> bindingAttr,
DN> Binder binder, Object[] args, CultureInfo culture, Object[]
DN> activationAttributes) +114
DN>
DN> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntP
DN> tr
DN> appContext, HttpContext context) +197
DN> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance()
DN> +27
DN>
DN> System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext
DN> context) +3460678
DN>
DN> System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext
DN> context) +125
DN>
DN> System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
DN> context) +99
DN> System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
DN> wr) +350






== 3 of 4 ==
Date: Sat, May 10 2008 8:28 am
From: "Danny Ni"


Hi Michael,

I am using IIS, my solution contains one web project and 7 class libraries,
the browsers always call pages from the web project. You are right,
restarting IIS make the problems go away. But it happens to live server even
when none of the new assemblies are deployed, that's what worries me, what
if problems happen while I am sleeping?

Thanks Again


"Michael Nemtsev [MVP]" <nemtsev@msn.com> wrote in message
news:900895ec3cba88ca81007359a5bc@msnews.microsoft.com...
> Hello Danny,
>
> what's the type of asp.net project on your dev machine - file or IIS?!
> Seems that IIS. Have u tried to restart IIS after you build new version of
> your assembly and before running site on dev?!
>
> if it doesnt help, try to remove everything from
> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
>
> seems that IIS load your new assembly to others, which were not flushed
> and new changed are not correcly used
>
> ---
> WBR, Michael  Nemtsev [.NET/C# MVP] :: blog:
> http://spaces.live.com/laflour
> "The greatest danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it" (c) Michelangelo
>
> DN> Hi,
> DN> DN> I need help with the following exceptions, it happens to my dev
> DN> machine and live server every now and then, most of the times they
> DN> happen after I recompile the solution on my dev machine or deploy
> DN> the new assembly to live server.   TIA
> DN> DN> Attempted to read or write protected memory. This is often an
> DN> indication
> DN> that other memory is corrupt.
> DN> Description: An unhandled exception occurred during the execution of
> DN> the
> DN> current web request. Please review the stack trace for more
> DN> information
> DN> about the error and where it originated in the code.
> DN> Exception Details: System.AccessViolationException: Attempted to
> DN> read or write protected memory. This is often an indication that
> DN> other memory is corrupt.
> DN> DN> Source Error:
> DN> DN> [No relevant source lines]
> DN> DN> Source File:
> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
> DN> ASP.NET
> DN> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fih
> DN> f.0.cs Line: 0
> DN> DN> Stack Trace:
> DN> DN> [AccessViolationException: Attempted to read or write protected
> DN> memory. This
> DN> is often an indication that other memory is corrupt.]
> DN> ASP.global_asax..ctor() in
> DN> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
> DN> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fih
> DN> f.0.cs:0
> DN> DN> [TargetInvocationException: Exception has been thrown by the
> target
> DN> of an
> DN> invocation.]
> DN> System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
> DN> publicOnly, Boolean noCheck, Boolean& canBeCached,
> DN> RuntimeMethodHandle&
> DN> ctor, Boolean& bNeedSecurityCheck) +0
> DN> System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
> DN> fillCache) +103
> DN> System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
> DN> skipVisibilityChecks, Boolean fillCache) +268
> DN> System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
> DN> System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
> DN> Binder
> DN> binder, Object[] args, CultureInfo culture, Object[]
> DN> activationAttributes)
> DN> +1036
> DN> System.Activator.CreateInstance(Type type, BindingFlags
> DN> bindingAttr,
> DN> Binder binder, Object[] args, CultureInfo culture, Object[]
> DN> activationAttributes) +114
> DN> DN>
> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntP
> DN> tr
> DN> appContext, HttpContext context) +197
> DN> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance()
> DN> +27
> DN> DN>
> System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext
> DN> context) +3460678
> DN> DN> System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext
> DN> context) +125
> DN> DN>
> System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
> DN> context) +99
> DN> System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
> DN> wr) +350
>
>






== 4 of 4 ==
Date: Sat, May 10 2008 9:44 am
From: Michael Nemtsev [MVP]


Hello Danny,

welll... u deploy nothing to production and you have the same error?!
but in your original post u wrote that it happens only after deployment'

after which actions you have such an error?!

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


DN> Hi Michael,
DN>
DN> I am using IIS, my solution contains one web project and 7 class
DN> libraries, the browsers always call pages from the web project. You
DN> are right, restarting IIS make the problems go away. But it happens
DN> to live server even when none of the new assemblies are deployed,
DN> that's what worries me, what if problems happen while I am sleeping?
DN>
DN> Thanks Again
DN>
DN> "Michael Nemtsev [MVP]" <nemtsev@msn.com> wrote in message
DN> news:900895ec3cba88ca81007359a5bc@msnews.microsoft.com...
DN>
>> Hello Danny,
>>
>> what's the type of asp.net project on your dev machine - file or
>> IIS?! Seems that IIS. Have u tried to restart IIS after you build new
>> version of your assembly and before running site on dev?!
>>
>> if it doesnt help, try to remove everything from
>> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
>> Files\
>>
>> seems that IIS load your new assembly to others, which were not
>> flushed and new changed are not correcly used
>>
>> ---
>> WBR, Michael  Nemtsev [.NET/C# MVP] :: blog:
>> http://spaces.live.com/laflour
>> "The greatest danger for most of us is not that our aim is too high
>> and we
>> miss it, but that it is too low and we reach it" (c) Michelangelo
>> DN> Hi,
>> DN> DN> I need help with the following exceptions, it happens to my
>> dev
>> DN> machine and live server every now and then, most of the times
>> they
>> DN> happen after I recompile the solution on my dev machine or deploy
>> DN> the new assembly to live server.   TIA
>> DN> DN> Attempted to read or write protected memory. This is often an
>> DN> indication
>> DN> that other memory is corrupt.
>> DN> Description: An unhandled exception occurred during the execution
>> of
>> DN> the
>> DN> current web request. Please review the stack trace for more
>> DN> information
>> DN> about the error and where it originated in the code.
>> DN> Exception Details: System.AccessViolationException: Attempted to
>> DN> read or write protected memory. This is often an indication that
>> DN> other memory is corrupt.
>> DN> DN> Source Error:
>> DN> DN> [No relevant source lines]
>> DN> DN> Source File:
>> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
>> DN> ASP.NET
>> DN>
>> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fih
>> DN> f.0.cs Line: 0
>> DN> DN> Stack Trace:
>> DN> DN> [AccessViolationException: Attempted to read or write
>> protected
>> DN> memory. This
>> DN> is often an indication that other memory is corrupt.]
>> DN> ASP.global_asax..ctor() in
>> DN> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
>> DN>
>> Files\aspdotnetstorefront70\ba2e2abd\22b6879\App_global.asax.cth5fih
>> DN> f.0.cs:0
>> DN> DN> [TargetInvocationException: Exception has been thrown by the
>> target
>> DN> of an
>> DN> invocation.]
>> DN> System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
>> DN> publicOnly, Boolean noCheck, Boolean& canBeCached,
>> DN> RuntimeMethodHandle&
>> DN> ctor, Boolean& bNeedSecurityCheck) +0
>> DN> System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
>> DN> fillCache) +103
>> DN> System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
>> DN> skipVisibilityChecks, Boolean fillCache) +268
>> DN> System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
>> DN> System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
>> DN> Binder
>> DN> binder, Object[] args, CultureInfo culture, Object[]
>> DN> activationAttributes)
>> DN> +1036
>> DN> System.Activator.CreateInstance(Type type, BindingFlags
>> DN> bindingAttr,
>> DN> Binder binder, Object[] args, CultureInfo culture, Object[]
>> DN> activationAttributes) +114
>> DN> DN>
>> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntP
>> DN> tr
>> DN> appContext, HttpContext context) +197
>> DN> System.Web.HttpApplicationFactory.GetSpecialApplicationInstance()
>> DN> +27
>> DN> DN>
>> System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext
>> DN> context) +3460678
>> DN> DN>
>> System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext
>> DN> context) +125
>> DN> DN>
>> System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
>> DN> context) +99
>> DN> System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
>> DN> wr) +350







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

== 1 of 1 ==
Date: Sat, May 10 2008 3:59 am
From: "Cindy H"


Yea - this is what he was asking for - thanks for everyones help!!!!



"Martin Honnen" <mahotrash@yahoo.de> wrote in message
news:ej6I5FesIHA.5472@TK2MSFTNGP06.phx.gbl...
> CindyH wrote:
>
>> This of course doesn't work with httputility.urlencode(doc.outerxml) as a
>> post
>
> If the data is posted as application/x-www-form-urlencoded then you can
> access it with
>   Request.Form("fieldname")
> so
>   Using reader As XmlReader = XmlReader.Create(new
> StringReader(Request.Form("fieldname")))
>     While reader.Read()
>       '...
>     End While
>   End Using
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/







==============================================================================
TOPIC: What do I need to develop SilverLight in MSVC2005
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/254b6e25deb4da41?hl=en
==============================================================================

== 1 of 4 ==
Date: Sat, May 10 2008 5:06 am
From: "m.a"


Hello,

 I have MSVC 2005 and I like to learn Silverlight. What do I need and can I
get them free (It is just for learning so any restriction is acceptable)?



is there any newsgroup about Silverlight?



Regards








== 2 of 4 ==
Date: Sat, May 10 2008 5:51 am
From: Michael Nemtsev [MVP]


Hello m.a,

You need Silverlight SDK for 1.1 version
MS now aimed on 2.0 version for VS 2008

http://silverlight.net/GetStarted/

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


m> Hello,
m>
m> I have MSVC 2005 and I like to learn Silverlight. What do I need
m> and can I get them free (It is just for learning so any restriction
m> is acceptable)?
m>
m> is there any newsgroup about Silverlight?
m>
m> Regards
m>






== 3 of 4 ==
Date: Sat, May 10 2008 6:44 am
From: "m.a"


Thanks,
  I looked at the page but I could not find any download for MSVC 2005.
There is download for MSVC2008. Can you please help me?

Regards

"Michael Nemtsev [MVP]" <nemtsev@msn.com> wrote in message
news:900895ec3cbbf8ca810777a6b48c@msnews.microsoft.com...
> Hello m.a,
>
> You need Silverlight SDK for 1.1 version
> MS now aimed on 2.0 version for VS 2008
>
> http://silverlight.net/GetStarted/
>
> ---
> WBR, Michael  Nemtsev [.NET/C# MVP] :: blog:
> http://spaces.live.com/laflour
> "The greatest danger for most of us is not that our aim is too high and we
> miss it, but that it is too low and we reach it" (c) Michelangelo
>
> m> Hello,
> m> m> I have MSVC 2005 and I like to learn Silverlight. What do I need
> m> and can I get them free (It is just for learning so any restriction
> m> is acceptable)?
> m> m> is there any newsgroup about Silverlight?
> m> m> Regards
> m>
>






== 4 of 4 ==
Date: Sat, May 10 2008 8:04 am
From: "Juan T. Llibre"


re:
!>   I looked at the page but I could not find any download for MSVC 2005.

You'll make your Silverlight life much easier if you install MSVC 2008.

Download MSVC 2008 here :
http://www.microsoft.com/express/download/

It will coexist happily with your MSVC2005 installation.

Then, download the Silverlight Tools/SDK at :
http://silverlight.net/GetStarted/





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/
======================================
"m.a" <ma.@spamoff.com> wrote in message news:XEhVj.37070$6a2.27403@newsfe17.ams2...
> Thanks,
>   I looked at the page but I could not find any download for MSVC 2005. There is download for MSVC2008. Can you please
> help me?
>
> Regards
>
> "Michael Nemtsev [MVP]" <nemtsev@msn.com> wrote in message news:900895ec3cbbf8ca810777a6b48c@msnews.microsoft.com...
>> Hello m.a,
>>
>> You need Silverlight SDK for 1.1 version
>> MS now aimed on 2.0 version for VS 2008
>>
>> http://silverlight.net/GetStarted/
>>
>> ---
>> WBR, Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
>> "The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we
>> reach it" (c) Michelangelo
>>
>> m> Hello,
>> m> m> I have MSVC 2005 and I like to learn Silverlight. What do I need
>> m> and can I get them free (It is just for learning so any restriction
>> m> is acceptable)?
>> m> m> is there any newsgroup about Silverlight?
>> m> m> Regards
>> m>
>>
>
>







==============================================================================
TOPIC: compaints about the VS.net 2008 editor
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/6fc1ea08376aa7a1?hl=en
==============================================================================

== 1 of 2 ==
Date: Sat, May 10 2008 5:16 am
From: "Cirene"


It seems like the VS.net 2008 editor is slow and buggy.  Have you found this
to be the case?

A few times I am working and all of a sudden all my images are stretched
funny.  I find out that behind the seens it modified the img tag width in my
css file.

Also, when dealing in split view with a page that is using a master page, it
seems slow and getting the properties to show up is a task.

Any thoughts?






== 2 of 2 ==
Date: Sat, May 10 2008 5:51 am
From: Michael Nemtsev [MVP]


Hello Cirene,

Did you try to instal VS 200 hotfix?! it was shipped this February

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


C> and all of a sudden all my images are stretched funny. I find out
C> that behind the seens it modified the img tag width in my css file.
C>
C> Also, when dealing in split view with a page that is using a master
C> page, it seems slow and getting the properties to show up is a task.
C>
C> Any thoughts?
C>







==============================================================================
TOPIC: Problem with Details view
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/7c102afa6804b6ba?hl=en
==============================================================================

== 1 of 2 ==
Date: Sat, May 10 2008 8:01 am
From: "Cirene"


I have a detailsview control.  In theInsertItemTemplate I have 2 cascade
dropdownlists (for category and subcategory).  For the 2nd one (subcategory)
I tried to do a databind to a field but I get this error:

Databinding methods such as Eval(), XPath(), and Bind() can only be used in
the context of a databound control.

Any ideas why?  Here's part of the html code...

              <InsertItemTemplate>
                  <table class="style3">
                      <tr>
                          <td class="style4">
                              Category:</td>
                          <td>
                              <asp:DropDownList ID="ddlCatInsert"
runat="server" AutoPostBack="True"
                                  DataSourceID="sdsCategories"
DataTextField="Category" DataValueField="Id"
                                  >
                              </asp:DropDownList>
                              <asp:SqlDataSource ID="sdsCategories"
runat="server"
                                  ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
                                  SelectCommand="SELECT * FROM
[classifiedCategories] ORDER BY [Category]">
                              </asp:SqlDataSource>
                          </td>
                      </tr>
                      <tr>
                          <td class="style4">
                              Subcategory:</td>
                          <td>
                              <asp:SqlDataSource ID="sdsSubCategories"
runat="server"
                                  ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
                                  SelectCommand="SELECT * FROM
[classifiedSubcategories] WHERE ([CategoryId] = @CategoryId)">
                                  <SelectParameters>
                                      <asp:ControlParameter
ControlID="ddlCatInsert" Name="CategoryId"
                                          PropertyName="SelectedValue"
Type="Int32" />
                                  </SelectParameters>
                              </asp:SqlDataSource>
                              <asp:DropDownList ID="DropDownList1"
runat="server"
                                  DataSourceID="sdsSubCategories"
DataTextField="SubCategory" DataValueField="Id"
                                  SelectedValue='<%# Bind("SubcategoryId")
%>'>
                              </asp:DropDownList>
                          </td>
                      </tr>






== 2 of 2 ==
Date: Sat, May 10 2008 8:02 am
From: "Cirene"


i mean FORMVIEW :)

"Cirene" <cirene@nowhere.com> wrote in message
news:uYpk46qsIHA.1768@TK2MSFTNGP03.phx.gbl...
>I have a detailsview control.  In theInsertItemTemplate I have 2 cascade
>dropdownlists (for category and subcategory).  For the 2nd one
>(subcategory) I tried to do a databind to a field but I get this error:
>
> Databinding methods such as Eval(), XPath(), and Bind() can only be used
> in the context of a databound control.
>
> Any ideas why?  Here's part of the html code...
>
>               <InsertItemTemplate>
>                   <table class="style3">
>                       <tr>
>                           <td class="style4">
>                               Category:</td>
>                           <td>
>                               <asp:DropDownList ID="ddlCatInsert"
> runat="server" AutoPostBack="True"
>                                   DataSourceID="sdsCategories"
> DataTextField="Category" DataValueField="Id"
>                                   >
>                               </asp:DropDownList>
>                               <asp:SqlDataSource ID="sdsCategories"
> runat="server"
>                                   ConnectionString="<%$
> ConnectionStrings:ConnectionString %>"
>                                   SelectCommand="SELECT * FROM
> [classifiedCategories] ORDER BY [Category]">
>                               </asp:SqlDataSource>
>                           </td>
>                       </tr>
>                       <tr>
>                           <td class="style4">
>                               Subcategory:</td>
>                           <td>
>                               <asp:SqlDataSource ID="sdsSubCategories"
> runat="server"
>                                   ConnectionString="<%$
> ConnectionStrings:ConnectionString %>"
>                                   SelectCommand="SELECT * FROM
> [classifiedSubcategories] WHERE ([CategoryId] = @CategoryId)">
>                                   <SelectParameters>
>                                       <asp:ControlParameter
> ControlID="ddlCatInsert" Name="CategoryId"
>                                           PropertyName="SelectedValue"
> Type="Int32" />
>                                   </SelectParameters>
>                               </asp:SqlDataSource>
>                               <asp:DropDownList ID="DropDownList1"
> runat="server"
>                                   DataSourceID="sdsSubCategories"
> DataTextField="SubCategory" DataValueField="Id"
>                                   SelectedValue='<%# Bind("SubcategoryId")
> %>'>
>                               </asp:DropDownList>
>                           </td>
>                       </tr>
>
>







==============================================================================
TOPIC: How to see appointment in a table
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/8449aa1feb95d038?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, May 10 2008 8:30 am
From: Luca


Please help me!!!





==============================================================================
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: Sat, May 10 2008 9:35 am
From: "Jonathan Wood"


Milosz,

> As you can see data is bound only once (for the same datasource
> parameters).

Thanks, that's what I was wondering about. I'm not sure if I understood how,
but I've printed out your reply and will examine the code more closely.

May I ask where you got that listing? I was thinking the framework source
was unavailable. What's the trick?

> You can always set SelectedValue in the Page_load, even before the data
> has
> been bound, as the SelectedValue is stored in the temporary variable until
> the next databinding:

Okay, I may need the data to correctly determine which item should be
selected. But that's helpful to know the SelectedValue can be set first.

Thanks again.

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





No comments: