25 new messages in 18 topics - digest


== 1 of 1 ==
Date: Fri, May 9 2008 1:38 pm
From: markm75




"markm75" wrote:

> I have a simple page i'm trying to do dynmaically.. i have a page called
> submitcomments.aspx with the .cs codebehind..
>
> before i created everything in design view.. now i've ripped that out and
> added a asp panel to the page and created a procedure in my c# datalayer.cs
> file called drawsubmitcomments
>
> in that procedure i create the text boxes and buttons.
>
>
>
> Problem is.. this code is not in the code behind for the page, so when i do
> commands like response.redirect.. i have to create a variable.. like say
> "Page varPage" and do a varPage.Response.redirect from the datalayer.cs
> procedure (which im not even sure if it will work)..
>
> I also had to create the click event, which now resides in that cs file as
> well.. so on the click event i cant check the values for say txtBOX1.text
> etc.. unless i made these text boxes "global variables" to the datalayer.cs..
>
> I'm not sure what the best practice is for something like this.. should i
> have done all the dynamic creation in the .cs codebehind file.. or make the
> variables global over there.. or something else?
>
> Thanks for any tips
>



Also.. if i try to dynamically create requiredfield validators.. they cant
find the controls they are to check when the page loads.. any thoughts on
this one too?






==============================================================================
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 2:05 pm
From: "Teemu Keiski"


Hi,

That's because LBFacilities controls exists on aspx page, and on separate js
file it (<%=... %>) doesn't get through ASP.NET's processing and therefore
is returned literally what's on the js file

e.g js file contains *literally*

...
alert(document.getElementById("<%=LBFacilities.ClientID%>").options.length);
...

If you use it that way, you need to set the LBFacilities somehow as argument
or on global js variable on the page which the js file references (makes js
though reliable on the existence of the control)


--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.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: String concact problem
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/7850d30ee0485957?hl=en
==============================================================================

== 1 of 2 ==
Date: Fri, May 9 2008 2:29 pm
From: "David C"


I have an asp.net page that is adding a javascript onclick event by adding
an attribute (see below).  The problem is that when the file name (shown as
strNewFile) has a single quote in the name (e.g. David's Document.doc) then
the javascript function fails.  I assume it is a string concat problem but
have been unable to solve it. Any help is appreciated.

David

               varControl = e.Item.FindControl("LBtnEmailDoc")
               varControl.Attributes.Add("onclick", "openOutlook('\\\\" &
strNewFile & "')")






== 2 of 2 ==
Date: Fri, May 9 2008 3:44 pm
From: Milosz Skalecki [MCAD]


Howdy,

varControl = e.Item.FindControl("LBtnEmailDoc")
varControl.Attributes.Add("onclick", "openOutlook('\\\\" &
strNewFile.Replace("'", "\'") & "')")

HTH
--
Milosz


"David C" wrote:

> I have an asp.net page that is adding a javascript onclick event by adding
> an attribute (see below).  The problem is that when the file name (shown as
> strNewFile) has a single quote in the name (e.g. David's Document.doc) then
> the javascript function fails.  I assume it is a string concat problem but
> have been unable to solve it. Any help is appreciated.
>
> David
>
>                 varControl = e.Item.FindControl("LBtnEmailDoc")
>                 varControl.Attributes.Add("onclick", "openOutlook('\\\\" &
> strNewFile & "')")
>
>
>





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

== 1 of 1 ==
Date: Fri, May 9 2008 3:40 pm
From: "Juan T. Llibre"


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: 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: Fri, May 9 2008 4:03 pm
From: Luca


Are many days that I've this problem, and I can't to resolve it :-((

I've a Table named "Activity" with

Date - DateTime type
Description - Varchar type


Now, using a range: FromDate ToDate

I would like to see:

In columns: the days (FromDate ...ToDate)
In rows: the Descriptions of the day (of each column)

Somebody can help me??

If my matrix (rows/columns) is a problem I could set the column to 7
days and see

In columns: 7 days
In rows: the descriptions of each day

is this more simple??

Note that each day can has many descriptions (rows)


Thanks for help me!!!





==============================================================================
TOPIC: Output Caching with Custom Handlers
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/dd68c20d48e985fd?hl=en
==============================================================================

== 1 of 2 ==
Date: Fri, May 9 2008 4:11 pm
From: John Smith


Cramer,
       You can utilize output caching on a handler, however you have to do it via code instead of declaratively.  If you add this block of code inside the "ProcessRequest" method your handler response will be cached.

TimeSpan freshness = new TimeSpan(0, 0, 5, 0);
DateTime now = DateTime.Now;
context.Response.Cache.SetExpires(now.Add(freshness));
context.Response.Cache.SetMaxAge(freshness);
context.Response.Cache.SetCacheability(HttpCacheability.Server);
context.Response.Cache.SetValidUntilExpires(true);

You can test it out pretty easily - write a handler which returns the current time

context.Response.ContentType = "text/plain";
context.Response.Write("Hello World " + DateTime.Now.ToLongTimeString());

And run the handler without the caching code a few times. The seconds will update (as you would expect). Add that block of code above and run it again, voila - the time won't change, its serving the page out of the output cache now.
It supports all the same methods the declarative approach does and affords you even more control.

context.Response.Cache.VaryByParams["C"] = true;





== 2 of 2 ==
Date: Fri, May 9 2008 5:51 pm
From: "Cramer"


Very good! Thanks! Since the OP I was making progress, but your sample code
shows how simple it can be.

-Cramer


<John Smith> wrote in message news:200859191136eamonn.fanning@gmail.com...
> Cramer,
> You can utilize output caching on a handler, however you have to do it via
> code instead of declaratively.  If you add this block of code inside the
> "ProcessRequest" method your handler response will be cached.
>
> TimeSpan freshness = new TimeSpan(0, 0, 5, 0);
> DateTime now = DateTime.Now;
> context.Response.Cache.SetExpires(now.Add(freshness));
> context.Response.Cache.SetMaxAge(freshness);
> context.Response.Cache.SetCacheability(HttpCacheability.Server);
> context.Response.Cache.SetValidUntilExpires(true);
>
> You can test it out pretty easily - write a handler which returns the
> current time
>
> context.Response.ContentType = "text/plain";
> context.Response.Write("Hello World " + DateTime.Now.ToLongTimeString());
>
> And run the handler without the caching code a few times. The seconds will
> update (as you would expect). Add that block of code above and run it
> again, voila - the time won't change, its serving the page out of the
> output cache now.
> It supports all the same methods the declarative approach does and affords
> you even more control.
>
> context.Response.Cache.VaryByParams["C"] = true;
>
>








==============================================================================
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: Fri, May 9 2008 4:30 pm
From: Milosz Skalecki [MCAD]


Hi Jomathan,

Ad 1. Yes, it does know.

BaseDataBoundControl:
protected internal override void OnPreRender(EventArgs e)
{
   this._preRendered = true;
   this.EnsureDataBound();
   base.OnPreRender(e);
}

protected virtual void EnsureDataBound()
{
   try
   {
       this._throwOnDataPropertyChange = true;
       if (this.RequiresDataBinding && ((this.DataSourceID.Length > 0) ||
this._requiresBindToNull))
       {
           this.DataBind();
           this._requiresBindToNull = false;
       }
   }
   finally
   {
       this._throwOnDataPropertyChange = false;
   }
}

protected virtual void OnDataPropertyChanged()
{
   if (this._throwOnDataPropertyChange)
   {
       throw new
HttpException(SR.GetString("DataBoundControl_InvalidDataPropertyChange", new
object[] { this.ID }));
   }
   if (this._inited)
   {
       this.RequiresDataBinding = true;
   }
}

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

Ad 2.

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:

ListControl (base class for lis type control, i.e. dropdownlist, bulletedlist)
public virtual string SelectedValue
{
   get
   {
       int selectedIndex = this.SelectedIndex;
       if (selectedIndex >= 0)
       {
           return this.Items[selectedIndex].Value;
       }
       return string.Empty;
   }
   set
   {
       if (this.Items.Count != 0)
       {
           if ((value == null) || (base.DesignMode && (value.Length == 0)))
           {
               this.ClearSelection();
               return;
           }
           ListItem item = this.Items.FindByValue(value);
           if ((((this.Page != null) && this.Page.IsPostBack) &&
this._stateLoaded) && (item == null))
           {
               throw new ArgumentOutOfRangeException("value",
SR.GetString("ListControl_SelectionOutOfRange", new object[] { this.ID,
"SelectedValue" }));
           }
           if (item != null)
           {
               this.ClearSelection();
               item.Selected = true;
           }
       }
       this.cachedSelectedValue = value;
   }
}

HTH
--
Milosz


"Jonathan Wood" wrote:

> Thanks, but as I described, my page's Load event cannot set the selected
> value because the control has not yet been databound.
>
> My question relates to calling the control's DataBind() method. If I do
> that, then the control has data. But my concern is about performance if the
> control automatically performs DataBind() before the page is finished, which
> would mean it happens twice.
>
> --
> Jonathan Wood
> SoftCircuits Programming
> http://www.softcircuits.com
>
> "Manish" <Manish@discussions.microsoft.com> wrote in message
> news:7500218E-8AE1-4609-94D8-83D66A6B6DE3@microsoft.com...
> > Hi Jonathan,
> >
> > Please know that if you bind the dropdownlist control at design time with
> > some datasource then also specify also specify its text and value fields
> > to
> > one of the column of the table. then you do not need to bind the
> > dropdownlist
> > at run time.
> >
> > Also, you can set the Selected Value of the control by calling
> >
> >  Me.DropDownList1.SelectedValue = 76
> >
> > but for that dropdownlist control should be bound.
> >
> > Regards,
> > Manish
> > www.componentone.com
> >
> >
> >
> > "Jonathan Wood" wrote:
> >
> >> 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: System.OutOfMemoryException and CompiledRegexRunner
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/1c173c6fe8bf2b09?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 4:38 pm
From: jason sirota


I have a 3rd Party application that once a day or so runs into
thousands of ASP.NET exceptions. The callstack indicates that it only
occurs when running an IsMatch on a compiled regular expression. It
seems to reach a certain threshhold of memory usage and then crashes.

If anyone has run into this problem before, can you suggest ways of
rewriting the code or changing IIS memory settings in order to handle?

Here's the code:

Regex matchNotTLD = new Regex("[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)+
$",RegexOptions.Compiled|RegexOptions.IgnoreCase);

if( (matchNotTLD.IsMatch(cookieDomain)) &&
(currentURL.IndexOf(cookieDomain) > -1) )

Here is the exception stack:

System.OutOfMemoryException: Exception of type
'System.OutOfMemoryException' was thrown.
  at Go153043(RegexRunner )
  at System.Text.RegularExpressions.CompiledRegexRunner.Go()
  at System.Text.RegularExpressions.RegexRunner.Scan(Regex regex,
String text, Int32 textbeg, Int32 textend, Int32 textstart, Int32
prevlen, Boolean quick)
  at System.Text.RegularExpressions.Regex.Run(Boolean quick, Int32
prevlen, String input, Int32 beginning, Int32 length, Int32 startat)
  at System.Text.RegularExpressions.Regex.IsMatch(String input)
  at CommunityServer.Components.UserCookie.WriteCookie(HttpCookie
cookie, Int32 days, Boolean autoLogin)
  at CommunityServer.Components.UserCookie.UpdateMostRecentActivity()
  at
CommunityServer.Components.UserLastVisitModule.csa_UserKnown(User
user, CSEventArgs e)
  at CommunityServer.Components.CSUserEventHandler.Invoke(User user,
CSEventArgs e)
  at CommunityServer.Components.CSApplication.ExecuteUserEvent(Object
EventKey, User user, ObjectState state, ApplicationType appType)
  at CommunityServer.CSHttpModule.Application_AuthorizeRequest(Object
source, EventArgs e)
  at
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)





==============================================================================
TOPIC: What do WebParts, WPF and PopFly have in common?
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/2fa030beddf7c103?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 5:14 pm
From: "clintonG"


Thank you for sharing your experience. The notion of web parts must be used
to build out my current line of business which I can run completely on IE.
Still I'm curious about what you meant by "IE only scripting?"

Have you evaluated or used the Yahoo User Interface (YUI) Library? Check out
their hosted Grid Builder [1]. I have heard nothing but praise for their
implementation of what we call AJAX noting YUI includes user interface
controls --but also-- a very very well designed implementation of a CSS
framework which I've been integrating with MasterPages. If you are building
web pages that have to run with various browsers I recommend you evaluate
the YUI CSS. As you know Microsoft has done a very poor job in this context
and I doubt I'll have any disagreement from anybody who has ever tried to be
efficient building pages with HTML-CSS; especially when using ASP.NET
controls.

The YUI Grid Builder is reminiscent of the PopFly web page builder I made
reference to. I need that type of functionality. I will design and build a
series of templates that contain zones which customers will select from a
library and then put their own content into. Its the methodology I am going
to use to do so I am trying to work out.

This is why I am looking at another user interface model than the HTML-CSS
which remains FUBAR. Studying the viability of WebParts with WPR/Silverlight
seems to be a sound premise at the moment. In fact, its looking more and
more like I am going to be compelled to build the entire line of business on
Sharepoint --but-- I do not believe Sharepoint supports WPF/Silverlight at
this point in time.

[1] http://developer.yahoo.com/yui/grids/builder/



"gerry" <germ@newsgroup.nospam> wrote in message
news:eiH$0HgsIHA.2292@TK2MSFTNGP03.phx.gbl...
> imo web parts are broken and always have been - they still do no
> completely work outside of IE ( drag&drop , drop down menus ... )
> they need a complete rewrite to use asp.net ajax instead of custom IE only
> scripting ,
> 100 % compatibility with update panel without a lot of dicking around
> would be nice.
> I also found it very difficult to get webparts/catalogues/zones etc
> satisfactorily styled - missing extension points
>
> imo asp.net web parts , lo these many years later, is still woefully short
> of being ready for prime time.
>
>
>
> "clintonG" <nobody@nowhere.com> wrote in message
> news:evejFCfsIHA.1240@TK2MSFTNGP02.phx.gbl...
>> Why don't we see more WebParts being used on the web? SharePoint gets all
>> the fun? And what are the prevailing opinions be they what they may about
>> the use of WebParts rather than WPF when the context would be the
>> development of a service which enables users to select templates that
>> have pre-established zones which function as content containers on a web
>> page?
>>
>> PopFly has a "build a web page" service for example. I need something
>> similar (don't many of us?) and I need the solution to function nearly
>> identical to the PopFly page builder as I've described and make reference
>> to.
>>
>> So do WebParts play a role as implied by the presence of zones? How might
>> this integrate with WPF then?
>>
>>
>
>






==============================================================================
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 6 ==
Date: Fri, May 9 2008 5:32 pm
From: gnewsgroup


I see u guys talking about url rewriting, and then I came across
www.actioncarting.com, where no page seem to have an extension
like .aspx, .html, .shtml, .asp, .jsp, .php.  Is this trick so-called
URL rewriting?  I would like to learn this little trick.  Thank you.




== 2 of 6 ==
Date: Fri, May 9 2008 5:40 pm
From: "Mark Rae [MVP]"


"gnewsgroup" <gnewsgroup@gmail.com> wrote in message
news:35f2929e-927d-4477-9ffb-e214c1918683@24g2000hsh.googlegroups.com...

> I see you guys talking about URL rewriting, and then I came across
> www.actioncarting.com, where no page seem to have an extension
> like .aspx, .html, .shtml, .asp, .jsp, .php.  Is this trick so-called
> URL rewriting?

No.

> I would like to learn this little trick.

No trick. All they're doing is specifying a folder rather than a file. This
way, ASP.NET / IIS will search for a "default" document and use one if it
exists:
http://www.google.co.uk/search?sourceid=navclient&hl=en-GB&ie=UTF-8&rlz=1T4GZEZ_en-GBGB252GB252&q=IIS+default+document


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





== 3 of 6 ==
Date: Fri, May 9 2008 5:53 pm
From: gnewsgroup


Mark Rae [MVP] wrote:
> "gnewsgroup" <gnewsgroup@gmail.com> wrote in message
> news:35f2929e-927d-4477-9ffb-e214c1918683@24g2000hsh.googlegroups.com...
>
> > I see you guys talking about URL rewriting, and then I came across
> > www.actioncarting.com, where no page seem to have an extension
> > like .aspx, .html, .shtml, .asp, .jsp, .php.  Is this trick so-called
> > URL rewriting?
>
> No.
>
> > I would like to learn this little trick.
>
> No trick. All they're doing is specifying a folder rather than a file. This
> way, ASP.NET / IIS will search for a "default" document and use one if it
> exists:
> http://www.google.co.uk/search?sourceid=navclient&hl=en-GB&ie=UTF-8&rlz=1T4GZEZ_en-GBGB252GB252&q=IIS+default+document
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net

Thank you. I also thought that they are simply letting the web server
retrieve the pre-defined default file.   But, then only one file per
folder will be retrieved. Isn't that too troublesome?

BTW, how do u tell it is not URL rewriting?  Thanks again.




== 4 of 6 ==
Date: Fri, May 9 2008 6:00 pm
From: "Mark Rae [MVP]"


"gnewsgroup" <gnewsgroup@gmail.com> wrote in message
news:9393545e-f3e0-4be0-a5fa-bc83cf28a51b@t54g2000hsg.googlegroups.com...

> Thank you. I also thought that they are simply letting the web server
> retrieve the pre-defined default file.   But, then only one file per
> folder will be retrieved. Isn't that too troublesome?

Depends on your requirements, I suppose...

> BTW, how do u tell it is not URL rewriting?

Experience.


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





== 5 of 6 ==
Date: Fri, May 9 2008 7:07 pm
From: Michael Nemtsev [MVP]


Hello gnewsgroup,

if you look on their site stucture, u will see that they have the different
url for each page, which could means that all pages are just index.aspx or
default.aspx . Actually I checked into Fiddler and it's php pages.

so, if u type /index.php in the end of url in will open you the same page,
but not the index2.php

---
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> Mark Rae [MVP] wrote:
g>
>> "gnewsgroup" <gnewsgroup@gmail.com> wrote in message
>> news:35f2929e-927d-4477-9ffb-e214c1918683@24g2000hsh.googlegroups.com
>> ...
>>
>>> I see you guys talking about URL rewriting, and then I came across
>>> www.actioncarting.com, where no page seem to have an extension
>>> like .aspx, .html, .shtml, .asp, .jsp, .php.  Is this trick
>>> so-called
>>> URL rewriting?
>> No.
>>
>>> I would like to learn this little trick.
>>>
>> No trick. All they're doing is specifying a folder rather than a
>> file. This
>>
>> way, ASP.NET / IIS will search for a "default" document and use one
>> if it
>>
>> exists:
>>
>> http://www.google.co.uk/search?sourceid=navclient&hl=en-GB&ie=UTF-8&r
>> lz=1T4GZEZ_en-GBGB252GB252&q=IIS+default+document
>>
>> --
>> Mark Rae
>> ASP.NET MVP
>> http://www.markrae.net
g> Thank you. I also thought that they are simply letting the web server
g> retrieve the pre-defined default file.   But, then only one file per
g> folder will be retrieved. Isn't that too troublesome?
g>
g> BTW, how do u tell it is not URL rewriting?  Thanks again.
g>






== 6 of 6 ==
Date: Fri, May 9 2008 7:46 pm
From: gnewsgroup


Mark Rae [MVP] wrote:
> "gnewsgroup" <gnewsgroup@gmail.com> wrote in message
> news:9393545e-f3e0-4be0-a5fa-bc83cf28a51b@t54g2000hsg.googlegroups.com...
>
> > Thank you. I also thought that they are simply letting the web server
> > retrieve the pre-defined default file.   But, then only one file per
> > folder will be retrieved. Isn't that too troublesome?
>
> Depends on your requirements, I suppose...
>
> > BTW, how do u tell it is not URL rewriting?
>
> Experience.
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net

OK. thank you. In any case, I can get the same effect thru url
rewriting, right?





==============================================================================
TOPIC: Visual Studio 2005 asks me to convert to a website when it is a web
application
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/c7199aadd766169a?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 5:31 pm
From: "clintonG"


I would wack the .sln and .proj files and create a website. Do the extra
work for now and go with the flow here. One thing Vista does well for
example (the only thing really as I've sadly discovered) is enable us to run
IIS7 which enables multiple websites on a single machine.

I now simply add an entry for 127.0.0.l and a website name into the hosts
file and load my websites in a browser on demand [1]. I keep my naming
simple as the names I use to design and develop the website are not needed
once a website is deployed but still remain functional and a fast way to
keep running the same "solution" on my development machine. As I code I
simply reload the page in the browser or let the page do a PostBack. Poof!
Instant efficiency.

This works so much better for me than the crippled and buggy development
server built into Visual Studio and is the only reason I would recommend
anybody begin using Vista to run IIS7.

[1] example of using hosts file
127.0.0.1 localhost # default
127.0.0.1 css1      # Nested MasterPage templates

// request in browser on local development machine resolved by IIS7:
http://css1

Poof! Instant efficiency.


"lds" <lisa.staples@gnb.ca> wrote in message
news:f7651b4a-23d1-4152-8998-aeedfdee4f7a@m44g2000hsc.googlegroups.com...
>I have Visual Studio 2005 Professional Edition installed with Service
> Pack 1.  I have several solutions and projects that I have migrated
> from Visual Studio 2003 to 2005.  In most cases the changes I had to
> make were small and when the web projects were converted it told me
> to
> select convert to web application, which I have done.
>
> This one application that I have migrated asks me to convert to a
> "web
> site project" every time I open the solution.  The application was
> built using Visual Studio 2003 and uses the same layout as all of the
> other applcations that we have developed.  Each time I open the
> solution, I get the warning to convert to web site so I right click
> on
> the web project, choose "convert to web application" and save the
> solution (because I want it to remain in the same format) hoping that
> it will stop asking me to convert to a web site.  But as I mentioned
> before everytime I open the solution it asks me again.
>
>
> Any ideas on what I should do to get it to accept it as a web
> application?
>






==============================================================================
TOPIC: How to send data to/from an ASP.NET and a Project (.exe)
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/2b46933a2ba52595?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 5:35 pm
From: "clintonG"


This objective is generally achieved using a Web Service. If you require
time dependency another developer told me he used a Windows Service to solve
the matter but he had control of his server to do so. You might also look
into Microsoft's Synch Framework and the Windows RSS Platform.

"S_K" <steve_kershaw@yahoo.com> wrote in message
news:3283c5d4-2f7f-4f2e-bf97-f73ce1154b07@h1g2000prh.googlegroups.com...
> Hi,
>
> You all have been so helpful to me before so I thought I'd ask this.
>
> I have a web page (ASP.NET) and I need to send data from this web
> page
> directly to an application (executable) I've developed that runs on a
> seperate server.
> I could write a file on the seperate server and have the executable
> check for new
> files every second or so, but that sounds like an old solution.
>
> Is there a way to write from anywhere (a URL for instance) to any
> application running
> on a particular server?
>
> Thanks much in advance.
>
> Steve






==============================================================================
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: Fri, May 9 2008 5:36 pm
From: Stan


On May 9, 1:06 am, "Nathan Sokalski" <njsokal...@hotmail.com> wrote:
> I am not talking about the Style property of a web server control, I am
> talking about a Web.UI.WebControls.Style object, which does not have an Add
> method. You seem to have the Style object confused with the
> CssStyleCollection object. These two object can be easy to confuse because
> the Style property is not an instance of the Style class. Any other
> suggestions?
> --
> Nathan Sokalski
> njsokal...@hotmail.comhttp://www.nathansokalski.com/
>
> "Stan" <goo...@philphall.me.uk> wrote in message
>
> news:fd22485c-66da-48a6-bcff-cd555c7fc8bb@b1g2000hsg.googlegroups.com...
>
>
>
> >> ...  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- Hide quoted text -
>
> - Show quoted text -

Ok, I misread your post slightly. Can I take it then that you are
trying encapsulate a set of css styles in an instance of
System.Web.UI.WebControl.Style class so it can be applied to any
control without having to set the properties for each control
individually? i.e. you are trying to emulate the way css "class"
attributes work without having to access the <style> tags.

I have tested the following which works OK
(note that System.Web.UI.WebControl namespace is within scope)

       Style s = new Style();
       s.Font.Size = FontUnit.Parse("2em");
       s.ForeColor = System.Drawing.Color.Blue;
       Label1.ControlStyle.CopyFrom(s);

Is that anything like what you are trying to do?

Note also that the Style object does not encapsulate all possible css
styles, e.g. it doesn't handle things like "margin" or "padding"
However the Style object does have a CssClass property that can be
used in the same way as those illustrated above except that the
definition of the css class has to reside in markup in the usual way.

Is there any reason why you can't use themes for all this, which allow
the selected application of both Skin and CSS style sheets, and can be
applied at page level using the @page directive (including content
pages) and hence at control level with css classes and Skin IDs?










==============================================================================
TOPIC: C# question... What are INTERFACES used for?
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/b91455c6f03fd093?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 6:01 pm
From: "Cramer"


Your question has a virtually unlimited number of [possible accurate
answers]. It's kind of like asking, "Hey, I just discovered this tool called
a hammer ... what can I use it for?"

A book that deals directly with your question, is Programming .NET
Components by Juval Lowy. Just chapters 1 and 3 are all you really need in
order to gain a clear understanding and  appreciation of Interfaces and
their pervasive role in modern object-oriented programming.

One of the best books, by far, that can help you really "get" some of the
many powerful uses of interfaces Head First Design Patterns by Eric Freeman
and Elizabeth Freeman.

-HTH




"S_K" <steve_kershaw@yahoo.com> wrote in message
news:757d2999-9101-4f03-9510-d3bd06d5e8ba@z16g2000prn.googlegroups.com...
> Hi,
> I've been toying around with interfaces in C#.
> They are fun but can anybody give me some examples of where interfaces
> are used
> and what they are used for?
>
> Thanks so much.
> Steve
>








==============================================================================
TOPIC: Slow Worker Process Startup
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/b20661c7fd400504?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 6:49 pm
From: Brian Gideon



On Apr 8, 1:11 pm, Brian Gideon <briangid...@yahoo.com> wrote:
> I'm having a problem with the amount of time it takes to initialize an
> application pool on IIS 6.0.  Upon the first request to an ASP.NET
> page the worker process (w3wp.exe) starts up.  The problem in my case
> is that it takes more than 5 minutes to begin servicing requests after
> the initial startup.  During that agonizingly long period the process
> is doing nothing...and I mean absolutely nothing...0% CPU and no
> memory movement at all.  And then all of sudden the CPU spikes and the
> page is rendered in a split second.  This happens to any web app no
> matter how simple or complex.  I'm seeing the problem on a dozen
> Windows 2003 boxes all built exactly the same way.  Has anyone else
> experienced this?

Well, I came across KB 944157 published on 2/22/08 describing an issue
with similar behavior that was fixed in SP1.  I'll do some research to
see if my issue is the same one.





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

== 1 of 1 ==
Date: Fri, May 9 2008 7:07 pm
From: "Cirene"


Thanks Juan!
"Juan T. Llibre" <nomailreplies@nowhere.com> wrote in message
news:Og$q12ZsIHA.3604@TK2MSFTNGP03.phx.gbl...
> re:
> !> This happens when i create an aspx page form a master page using
> EXPRESSION WEB
>
> No wonder you're having problems.
>
> Expression Web doesn't handle code in separate files.
> In fact, it doesn't handle code-behind at all.
>
> If you can't afford the full Visual Studio (2005 or 2008)
> download the free Visual Web Developer from :
>
> Visual Web Developer 2005 :
> http://msdn.microsoft.com/en-us/express/aa975050.aspx
>
> Visual Web Developer 2008 :
> http://www.microsoft.com/express/download/
>
> VWD handles code-behind in separate files.
>
> re:
> !> even though I check "Place code in separate file"
>
> Are you sure you did that in Expression Web ?
> Expression Web doesn't have that option.
>
>
>
>
>
> 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/
> ======================================
> "Cirene" <cirene@nowhere.com> wrote in message
> news:%23aiqsHWsIHA.548@TK2MSFTNGP06.phx.gbl...
>> 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: How use NOW() function in InsertCommand
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/a20e1ca0bc72af19?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 7:07 pm
From: "Cirene"


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: AccessViolationException
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/c3a2102f1cc57bec?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, May 9 2008 7:17 pm
From: "Danny Ni"


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









No comments: