Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computer Certification > MCAD > Who can give me a explanation?

Reply
Thread Tools

Who can give me a explanation?

 
 
Robert
Guest
Posts: n/a
 
      09-06-2004
Here is a question from dumps, I don't agree to that
answer. who can help me?

Q: You are a Web developer for a Gsoft bookstore. You
create a Web user control named
CkBookTopics that is defined in a file named
CkBookTopics.ascx. CkBookTopics displays a list
of book topics based on an author's profile identification
number. The profile identification
number is stored in a public property of CkBookTopics
named AuthorProfile.
You create an ASP.NET page named AuthorPage.aspx that
contains an instance of the
CkBookTopics Web user control. AuthorPage.aspx is opened
by an HTTP-GET request that
has two parameters. The parameters are named publisherID
and authorProfileID. The value
of authorProfileID is a profile identification number.
You want to enable output caching for the CkBookTopics Web
user control. You need to
ensure that the cached control is varied only by an
author's profile identification number.
What should you do?

A. Add the following element to the OutputCache directive
for AuthorPage.aspx:
VaryByParam="CkBookTopics.AuthorProfile"
B. Add the following element to the OutputCache directive
for AuthorPage.aspx:
VaryByControl="CkBookTopics.AuthorProfile"
C. Add the following element to the OutputCache directive
for CkBookTopics.ascx:
VaryByParam="none"
D. Add the following element to the OutputCache directive
for CkBookTopics.ascx:
VaryByControl="authorProfileID"
Answer: D


according to MSDN, "You can vary user-control output to
the cache in two ways: by specifying the user control name
along with either a query string or a form POST parameter,
or by specifying the ID property of an ASP.NET server
control contained in the user control." the former is
VaryByParam, the later is varybycontrol. however, in this
case, if we choose D, we should put a control ID here,
not "authorProfileID" parameter.

who can give me a hint? thanks



 
Reply With Quote
 
 
 
 
Frank Mamone
Guest
Posts: n/a
 
      09-06-2004
Good question.

From what I studied, the bottom line is when you want to cache a user
control by one of it's properties then you use VaryByControl and when you
want to cache it based on a query string or posted variable then you use
VaryByParam.

Since we're talking about a property here then D is the only possible answer
here. That being said, I think your real question is why MSDN says to use
the ID of the Control. Well, that doesn't make sense to me because then we
wouldn't know what parameter in the control to cache by. It should be a
property.

In my mind the answer should be:

VaryByControl="AuthorProfile" as that is the name of the property.

Maybe some experts can chime into this conversation and clear this up.

I have found many mistakes in practice exams, so that would not surprise me.

- Frank M.



"Robert" <(E-Mail Removed)> wrote in message
news:6c4c01c49419$5c98af60$(E-Mail Removed)...
> Here is a question from dumps, I don't agree to that
> answer. who can help me?
>
> Q: You are a Web developer for a Gsoft bookstore. You
> create a Web user control named
> CkBookTopics that is defined in a file named
> CkBookTopics.ascx. CkBookTopics displays a list
> of book topics based on an author's profile identification
> number. The profile identification
> number is stored in a public property of CkBookTopics
> named AuthorProfile.
> You create an ASP.NET page named AuthorPage.aspx that
> contains an instance of the
> CkBookTopics Web user control. AuthorPage.aspx is opened
> by an HTTP-GET request that
> has two parameters. The parameters are named publisherID
> and authorProfileID. The value
> of authorProfileID is a profile identification number.
> You want to enable output caching for the CkBookTopics Web
> user control. You need to
> ensure that the cached control is varied only by an
> author's profile identification number.
> What should you do?
>
> A. Add the following element to the OutputCache directive
> for AuthorPage.aspx:
> VaryByParam="CkBookTopics.AuthorProfile"
> B. Add the following element to the OutputCache directive
> for AuthorPage.aspx:
> VaryByControl="CkBookTopics.AuthorProfile"
> C. Add the following element to the OutputCache directive
> for CkBookTopics.ascx:
> VaryByParam="none"
> D. Add the following element to the OutputCache directive
> for CkBookTopics.ascx:
> VaryByControl="authorProfileID"
> Answer: D
>
>
> according to MSDN, "You can vary user-control output to
> the cache in two ways: by specifying the user control name
> along with either a query string or a form POST parameter,
> or by specifying the ID property of an ASP.NET server
> control contained in the user control." the former is
> VaryByParam, the later is varybycontrol. however, in this
> case, if we choose D, we should put a control ID here,
> not "authorProfileID" parameter.
>
> who can give me a hint? thanks
>
>
>



 
Reply With Quote
 
 
 
 
Frank Mamone
Guest
Posts: n/a
 
      09-06-2004
I stand corrected on the property name theory. Here is MSDN's explanation:

To cache multiple versions of a user control declaratively by using the
VaryByControl attribute

1.. Create a user control that posts back.
2.. Include an @ OutputCache directive in the .ascx file with Duration and
VaryByControl attributes.
Note If you include use the VaryByControl attribute in the directive,
you do not need to include the VaryByParam attribute.
3.. Set the VaryByControl attribute to the name of the query string or
form POST parameter that you want to vary the user control output by in the
output cache.
For example, the following @ OutputCache directive sets expirations for
the user control to 60 seconds and varies the control's output by a state
parameter.

<%@ OutputCache Duration="60" VaryByControl="State" %>

"Frank Mamone" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Good question.
>
> From what I studied, the bottom line is when you want to cache a user
> control by one of it's properties then you use VaryByControl and when you
> want to cache it based on a query string or posted variable then you use
> VaryByParam.
>
> Since we're talking about a property here then D is the only possible

answer
> here. That being said, I think your real question is why MSDN says to use
> the ID of the Control. Well, that doesn't make sense to me because then we
> wouldn't know what parameter in the control to cache by. It should be a
> property.
>
> In my mind the answer should be:
>
> VaryByControl="AuthorProfile" as that is the name of the property.
>
> Maybe some experts can chime into this conversation and clear this up.
>
> I have found many mistakes in practice exams, so that would not surprise

me.
>
> - Frank M.
>
>
>
> "Robert" <(E-Mail Removed)> wrote in message
> news:6c4c01c49419$5c98af60$(E-Mail Removed)...
> > Here is a question from dumps, I don't agree to that
> > answer. who can help me?
> >
> > Q: You are a Web developer for a Gsoft bookstore. You
> > create a Web user control named
> > CkBookTopics that is defined in a file named
> > CkBookTopics.ascx. CkBookTopics displays a list
> > of book topics based on an author's profile identification
> > number. The profile identification
> > number is stored in a public property of CkBookTopics
> > named AuthorProfile.
> > You create an ASP.NET page named AuthorPage.aspx that
> > contains an instance of the
> > CkBookTopics Web user control. AuthorPage.aspx is opened
> > by an HTTP-GET request that
> > has two parameters. The parameters are named publisherID
> > and authorProfileID. The value
> > of authorProfileID is a profile identification number.
> > You want to enable output caching for the CkBookTopics Web
> > user control. You need to
> > ensure that the cached control is varied only by an
> > author's profile identification number.
> > What should you do?
> >
> > A. Add the following element to the OutputCache directive
> > for AuthorPage.aspx:
> > VaryByParam="CkBookTopics.AuthorProfile"
> > B. Add the following element to the OutputCache directive
> > for AuthorPage.aspx:
> > VaryByControl="CkBookTopics.AuthorProfile"
> > C. Add the following element to the OutputCache directive
> > for CkBookTopics.ascx:
> > VaryByParam="none"
> > D. Add the following element to the OutputCache directive
> > for CkBookTopics.ascx:
> > VaryByControl="authorProfileID"
> > Answer: D
> >
> >
> > according to MSDN, "You can vary user-control output to
> > the cache in two ways: by specifying the user control name
> > along with either a query string or a form POST parameter,
> > or by specifying the ID property of an ASP.NET server
> > control contained in the user control." the former is
> > VaryByParam, the later is varybycontrol. however, in this
> > case, if we choose D, we should put a control ID here,
> > not "authorProfileID" parameter.
> >
> > who can give me a hint? thanks
> >
> >
> >

>
>



 
Reply With Quote
 
Lateralus [MCAD]
Guest
Posts: n/a
 
      09-06-2004
Robert,
I think the first question you should be asking is "Why am I looking at
braindumps?"

--
Lateralus [MCAD]


"Robert" <(E-Mail Removed)> wrote in message
news:6c4c01c49419$5c98af60$(E-Mail Removed)...
> Here is a question from dumps, I don't agree to that
> answer. who can help me?
>
> Q: You are a Web developer for a Gsoft bookstore. You
> create a Web user control named
> CkBookTopics that is defined in a file named
> CkBookTopics.ascx. CkBookTopics displays a list
> of book topics based on an author's profile identification
> number. The profile identification
> number is stored in a public property of CkBookTopics
> named AuthorProfile.
> You create an ASP.NET page named AuthorPage.aspx that
> contains an instance of the
> CkBookTopics Web user control. AuthorPage.aspx is opened
> by an HTTP-GET request that
> has two parameters. The parameters are named publisherID
> and authorProfileID. The value
> of authorProfileID is a profile identification number.
> You want to enable output caching for the CkBookTopics Web
> user control. You need to
> ensure that the cached control is varied only by an
> author's profile identification number.
> What should you do?
>
> A. Add the following element to the OutputCache directive
> for AuthorPage.aspx:
> VaryByParam="CkBookTopics.AuthorProfile"
> B. Add the following element to the OutputCache directive
> for AuthorPage.aspx:
> VaryByControl="CkBookTopics.AuthorProfile"
> C. Add the following element to the OutputCache directive
> for CkBookTopics.ascx:
> VaryByParam="none"
> D. Add the following element to the OutputCache directive
> for CkBookTopics.ascx:
> VaryByControl="authorProfileID"
> Answer: D
>
>
> according to MSDN, "You can vary user-control output to
> the cache in two ways: by specifying the user control name
> along with either a query string or a form POST parameter,
> or by specifying the ID property of an ASP.NET server
> control contained in the user control." the former is
> VaryByParam, the later is varybycontrol. however, in this
> case, if we choose D, we should put a control ID here,
> not "authorProfileID" parameter.
>
> who can give me a hint? thanks
>
>
>



 
Reply With Quote
 
Robert
Guest
Posts: n/a
 
      09-07-2004
Thanks very much
>-----Original Message-----
>Good question.
>
>From what I studied, the bottom line is when you want to

cache a user
>control by one of it's properties then you use

VaryByControl and when you
>want to cache it based on a query string or posted

variable then you use
>VaryByParam.
>
>Since we're talking about a property here then D is the

only possible answer
>here. That being said, I think your real question is why

MSDN says to use
>the ID of the Control. Well, that doesn't make sense to

me because then we
>wouldn't know what parameter in the control to cache by.

It should be a
>property.
>
>In my mind the answer should be:
>
>VaryByControl="AuthorProfile" as that is the name of the

property.
>
>Maybe some experts can chime into this conversation and

clear this up.
>
>I have found many mistakes in practice exams, so that

would not surprise me.
>
>- Frank M.
>
>
>
>"Robert" <(E-Mail Removed)> wrote in

message
>news:6c4c01c49419$5c98af60$(E-Mail Removed)...
>> Here is a question from dumps, I don't agree to that
>> answer. who can help me?
>>
>> Q: You are a Web developer for a Gsoft bookstore. You
>> create a Web user control named
>> CkBookTopics that is defined in a file named
>> CkBookTopics.ascx. CkBookTopics displays a list
>> of book topics based on an author's profile

identification
>> number. The profile identification
>> number is stored in a public property of CkBookTopics
>> named AuthorProfile.
>> You create an ASP.NET page named AuthorPage.aspx that
>> contains an instance of the
>> CkBookTopics Web user control. AuthorPage.aspx is opened
>> by an HTTP-GET request that
>> has two parameters. The parameters are named publisherID
>> and authorProfileID. The value
>> of authorProfileID is a profile identification number.
>> You want to enable output caching for the CkBookTopics

Web
>> user control. You need to
>> ensure that the cached control is varied only by an
>> author's profile identification number.
>> What should you do?
>>
>> A. Add the following element to the OutputCache

directive
>> for AuthorPage.aspx:
>> VaryByParam="CkBookTopics.AuthorProfile"
>> B. Add the following element to the OutputCache

directive
>> for AuthorPage.aspx:
>> VaryByControl="CkBookTopics.AuthorProfile"
>> C. Add the following element to the OutputCache

directive
>> for CkBookTopics.ascx:
>> VaryByParam="none"
>> D. Add the following element to the OutputCache

directive
>> for CkBookTopics.ascx:
>> VaryByControl="authorProfileID"
>> Answer: D
>>
>>
>> according to MSDN, "You can vary user-control output to
>> the cache in two ways: by specifying the user control

name
>> along with either a query string or a form POST

parameter,
>> or by specifying the ID property of an ASP.NET server
>> control contained in the user control." the former is
>> VaryByParam, the later is varybycontrol. however, in

this
>> case, if we choose D, we should put a control ID here,
>> not "authorProfileID" parameter.
>>
>> who can give me a hint? thanks
>>
>>
>>

>
>
>.
>

 
Reply With Quote
 
S.S.Raja
Guest
Posts: n/a
 
      09-09-2004
Are You Using braindumps?! Thats not fair...



 
Reply With Quote
 
Frank Mamone
Guest
Posts: n/a
 
      09-09-2004
I'm not sure how a BrainDump is defined but here is what I am doing.

I'm using two books to actually learn the material:

1. Amit Kalanis 70-315
2. MS Press Self-Training Kit

I typed in and ran every Step by Step in the Kalani book and use the MS
Press book as a secondary reference as I really don't like the format.

I also use Practice tests to get used to the format and questions I may get
exposed to at the actual exam. It also serves as a great review and points
out the areas I need to work on. Since the exams have links to MSDN, I also
go to those links and learn as much as possible from there.

I really can't see how someone can actually go out there and work by only
using the practice exams. I think it's possible in the scenario where the
person already has a job in the technology and wants to be certified.

I hope that answers your question.

- Frank M.

"S.S.Raja" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Are You Using braindumps?! Thats not fair...
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
We dont give only job... We give you the Job Satisfaction....... Anuj Digital Photography 0 01-02-2007 06:35 PM
GIVE ME FILM OR GIVE ME DEATH l#vfgsgEg@AO1.com DVD Video 4 07-14-2005 03:10 PM
Why wouldn't this line of give give the address of the pointer? grocery_stocker C Programming 10 05-25-2005 03:05 AM
Give us 3 minutes; we give you the whole library lib Computer Support 1 02-04-2005 03:16 AM
Give us 3 minutes; we give you the whole library lib Computer Support 0 01-27-2005 07:52 AM



Advertisments