[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

Dynamically setting file name in a hyperlink

Anne Butera

11/7/2007 4:26:00 AM

I want to set a navigate URL to include the name of a file, that is derived
from a field from the SQL query. I get "Server Tag is not well formed" when
I try to run this:

<asp:HyperLink ID="hyperlink" runat="server" NavigateUrl="\\server\share\"
'<%# Eval("storeNumber")'%> ".doc" >config1</asp:HyperLink>

I want the url to be \\server\share\3.doc

Can someone please tell me what I am doing wrong, or is there a better way
to do this?

Thank you for your time

Ann
99 Answers

Mark Fitzpatrick

11/7/2007 1:19:00 PM

0

Ann,

If you look at the NavigateUrl attribute, you have a bunch of single and
doublequotes. You're going to end up with somethign that looks like this

\\server\share"'3".doc"

Try something like this
<asp:HyperLink ID="hyperlink" runat="server"
NavigateUrl="\\server\share\<%# Eval("storeNumber")%>.doc"
>config1</asp:HyperLink>


--

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

"Anne Butera" <AnneButera@discussions.microsoft.com> wrote in message
news:DFAA741C-2710-4DE2-B4D9-1AA2547C6B37@microsoft.com...
>I want to set a navigate URL to include the name of a file, that is derived
> from a field from the SQL query. I get "Server Tag is not well formed"
> when
> I try to run this:
>
> <asp:HyperLink ID="hyperlink" runat="server" NavigateUrl="\\server\share\"
> '<%# Eval("storeNumber")'%> ".doc" >config1</asp:HyperLink>
>
> I want the url to be \\server\share\3.doc
>
> Can someone please tell me what I am doing wrong, or is there a better way
> to do this?
>
> Thank you for your time
>
> Ann


Anne Butera

11/7/2007 4:58:00 PM

0

Thank you for your reply.

So I tried your suggetions, and now I'm able to run the form and click the
hyperlink, but the url looks like this:

\\server\share\<%# Eval("storeNumber") %>.doc

Here's the code I used:

<asp:HyperLink ID="HLconfig1" runat="server" NavigateUrl='\\server\share\<%#
Eval("storeNumber") %>.doc'>config1</asp:HyperLink>


Do you have any other suggestions? Thank you for your time.


"Mark Fitzpatrick" wrote:

> Ann,
>
> If you look at the NavigateUrl attribute, you have a bunch of single and
> doublequotes. You're going to end up with somethign that looks like this
>
> \\server\share"'3".doc"
>
> Try something like this
> <asp:HyperLink ID="hyperlink" runat="server"
> NavigateUrl="\\server\share\<%# Eval("storeNumber")%>.doc"
> >config1</asp:HyperLink>
>
>
> --
>
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - Expression
>
> "Anne Butera" <AnneButera@discussions.microsoft.com> wrote in message
> news:DFAA741C-2710-4DE2-B4D9-1AA2547C6B37@microsoft.com...
> >I want to set a navigate URL to include the name of a file, that is derived
> > from a field from the SQL query. I get "Server Tag is not well formed"
> > when
> > I try to run this:
> >
> > <asp:HyperLink ID="hyperlink" runat="server" NavigateUrl="\\server\share\"
> > '<%# Eval("storeNumber")'%> ".doc" >config1</asp:HyperLink>
> >
> > I want the url to be \\server\share\3.doc
> >
> > Can someone please tell me what I am doing wrong, or is there a better way
> > to do this?
> >
> > Thank you for your time
> >
> > Ann
>
>
>

Riki

11/11/2007 2:55:00 PM

0

Try:
NavigateUrl='<%# Eval("storeNumber","\\server\share\{0}") %>'

--
Riki

Anne Butera wrote:
> Thank you for your reply.
>
> So I tried your suggetions, and now I'm able to run the form and
> click the hyperlink, but the url looks like this:
>
> \\server\share\<%# Eval("storeNumber") %>.doc
>
> Here's the code I used:
>
> <asp:HyperLink ID="HLconfig1" runat="server"
> NavigateUrl='\\server\share\<%# Eval("storeNumber")
> %>.doc'>config1</asp:HyperLink>
>
>
> Do you have any other suggestions? Thank you for your time.
>
>
> "Mark Fitzpatrick" wrote:
>
>> Ann,
>>
>> If you look at the NavigateUrl attribute, you have a bunch of single
>> and doublequotes. You're going to end up with somethign that looks
>> like this
>>
>> \\server\share"'3".doc"
>>
>> Try something like this
>> <asp:HyperLink ID="hyperlink" runat="server"
>> NavigateUrl="\\server\share\<%# Eval("storeNumber")%>.doc"
>> >config1</asp:HyperLink>
>>
>>
>> --
>>
>> Hope this helps,
>> Mark Fitzpatrick
>> Microsoft MVP - Expression
>>
>> "Anne Butera" <AnneButera@discussions.microsoft.com> wrote in message
>> news:DFAA741C-2710-4DE2-B4D9-1AA2547C6B37@microsoft.com...
>>> I want to set a navigate URL to include the name of a file, that is
>>> derived from a field from the SQL query. I get "Server Tag is not
>>> well formed" when
>>> I try to run this:
>>>
>>> <asp:HyperLink ID="hyperlink" runat="server"
>>> NavigateUrl="\\server\share\" '<%# Eval("storeNumber")'%> ".doc"
>>> >config1</asp:HyperLink>
>>>
>>> I want the url to be \\server\share\3.doc
>>>
>>> Can someone please tell me what I am doing wrong, or is there a
>>> better way to do this?
>>>
>>> Thank you for your time
>>>
>>> Ann


Anne Butera

11/13/2007 7:59:00 PM

0

Yes, that worked! Thanks

"Riki" wrote:

> Try:
> NavigateUrl='<%# Eval("storeNumber","\\server\share\{0}") %>'
>
> --
> Riki
>
> Anne Butera wrote:
> > Thank you for your reply.
> >
> > So I tried your suggetions, and now I'm able to run the form and
> > click the hyperlink, but the url looks like this:
> >
> > \\server\share\<%# Eval("storeNumber") %>.doc
> >
> > Here's the code I used:
> >
> > <asp:HyperLink ID="HLconfig1" runat="server"
> > NavigateUrl='\\server\share\<%# Eval("storeNumber")
> > %>.doc'>config1</asp:HyperLink>
> >
> >
> > Do you have any other suggestions? Thank you for your time.
> >
> >
> > "Mark Fitzpatrick" wrote:
> >
> >> Ann,
> >>
> >> If you look at the NavigateUrl attribute, you have a bunch of single
> >> and doublequotes. You're going to end up with somethign that looks
> >> like this
> >>
> >> \\server\share"'3".doc"
> >>
> >> Try something like this
> >> <asp:HyperLink ID="hyperlink" runat="server"
> >> NavigateUrl="\\server\share\<%# Eval("storeNumber")%>.doc"
> >> >config1</asp:HyperLink>
> >>
> >>
> >> --
> >>
> >> Hope this helps,
> >> Mark Fitzpatrick
> >> Microsoft MVP - Expression
> >>
> >> "Anne Butera" <AnneButera@discussions.microsoft.com> wrote in message
> >> news:DFAA741C-2710-4DE2-B4D9-1AA2547C6B37@microsoft.com...
> >>> I want to set a navigate URL to include the name of a file, that is
> >>> derived from a field from the SQL query. I get "Server Tag is not
> >>> well formed" when
> >>> I try to run this:
> >>>
> >>> <asp:HyperLink ID="hyperlink" runat="server"
> >>> NavigateUrl="\\server\share\" '<%# Eval("storeNumber")'%> ".doc"
> >>> >config1</asp:HyperLink>
> >>>
> >>> I want the url to be \\server\share\3.doc
> >>>
> >>> Can someone please tell me what I am doing wrong, or is there a
> >>> better way to do this?
> >>>
> >>> Thank you for your time
> >>>
> >>> Ann
>
>
>

Free Lunch

7/7/2012 2:44:00 PM

0

On Sat, 7 Jul 2012 07:23:11 -0700 (PDT), Milt <milt.shook@gmail.com>
wrote in alt.atheism:

>On Jul 7, 9:24?am, 3054 Dead <d...@gone.com> wrote:
>> On Sat, 07 Jul 2012 14:38:07 +0200, thomas p. wrote:
>> > "Steve" <stevencan...@yahooooo.com> skrev i meddelelsen
>> >news:4doev7561ipo35p13oh4jk9cuc7q2buu5o@4ax.com...
>> >> On Fri, 6 Jul 2012 13:45:08 -0700 (PDT), SkyEyes <skyey...@cox.net>
>> >> wrote:
>>
>> > snip
>>
>> >>>That's right - nobody knows the absolute truth (or indeed *anything*) -
>> >>>about any "higher beings." ?That's why the vast majority of the
>> >>>atheists on this group are also agnostics. ?Atheism is a statement of
>> >>>belief; agnosticism is a statement about knowledge. ?I don't know that
>> >>>any higher being exists, therefore I do not believe in one.
>>
>> >> Actually, an agnostic atheist is someone who does not believe, but who
>> >> does not deny the possibility. ?Is that your position?
>>
>> > And an agnostic theist is someone who does believe but who does not
>> > know.
>> > Those theists who believe that the gift of faith is required in order to
>> > believe can be said to not know.
>>
>> >> ?See how
>> >>>easy that is?
>>
>> >>>Brenda Nelson, A.A.#34 BAAWA Knight of the Golden Litterbox EAC
>> >>>Professor of Feline Thermometrics and Cat-Herding skyeyes nine at cox
>> >>>dot net OR skyeyes nine at yahoo dot com
>>
>> Fundies love to conflate possibilities with the false certainties of
>> their beliefs.
>
>So your pledged certainty that there is no god is due to your
>fundamentalism. Glad to see you admit it. Kind of.

Are you under the impression that there is any evidence that any gods
exist or that anyone has ever described a god that could exist?

>> A lot of atheists would acknowledge the possibility in a
>> universe as big as ours that beings superior to ourselves with god-like
>> powers might exist. ?Some will even admit that in the lack of any
>> evidence of what came before the big bang, any theory is on the table as
>> to what caused it.
>>
>> So: they are agnostics.
>
>No. This is the blind spot some of you evangelical atheists have that
>makes you as frustrating to deal with as evangelical Christians. It's
>called "faith" for a reason. Neither side can be proven correct. The
>acknowledgement that nothing can be proven is "agnostic." But the term
>"agnostic" doesn't work as a label. Because it's actually possible for
>someone with an agnostic viewpoint to be either theist or atheist.
>
>Ah, but labels are easy.
>>
>> But they look at the god described in the bible, the koran, or the talmud,
>> and they see a logical impossibility; an absurdity on the face of it; an
>> entity far less believable than space aliens or unicorns because unlike
>> those, the god of the holy texts simply is not possible.
>>
>> So: they are atheists.
>
>And therein lies the vacuousness of the evangelical atheist.
>
>Tell me, Zepp. Does the fact that Abraham Lincoln didn't really hunt
>and kill vampires (that we know of) mean that Abraham Lincoln didn't
>exist? Does the fact that Shakespeare wrote a fictional account of
>Julius Caesar's life mean that Caesar didn't exist?
>
>MOST Christian clergy and theologians, when pressed, will tell you
>that most of he Bible is meant as a teaching tool, and that the Bible
>is not a history book. Yet, they're still Christian. Why? Because they
>believe God exists, regardless of what humans have written about him/
>her/it. Please explain for the class how proving that Jonah didn't
>actually spend several days inside a "great fish" would prove there
>can't be a god/creator.
>
>Do you see the logical disconnect there? Even if you proved all the
>stories in all of those books are complete bullshit, you cannot prove
>there is no God. By the same token, if someone were able to prove that
>many of the stories in the Bible actually happened, that still
>wouldn't prove there IS a god.
>
>You work just as hard to support your impossible-to-prove concept that
>there can't be a god as the average Fundie does trying to prove
>everything in the Bible is correct and there is a god. There's really
>no difference; both are irritating.
>>
>> So it's possible to be one or the other, depending on which set of
>> possibilities or impossibilities you are presented.
>
>It's also possible to be both, since agnosticism is basically the
>acknowledgement that God/no God cannot be proven either way, and
>theists and atheists can do so.

Milt

7/7/2012 2:54:00 PM

0

On Jul 7, 10:43 am, Free Lunch <lu...@nofreelunch.us> wrote:
> On Sat, 7 Jul 2012 07:23:11 -0700 (PDT), Milt <milt.sh...@gmail.com>
> wrote in alt.atheism:
>
>
>
>
>
>
>
>
>
> >On Jul 7, 9:24 am, 3054 Dead <d...@gone.com> wrote:
> >> On Sat, 07 Jul 2012 14:38:07 +0200, thomas p. wrote:
> >> > "Steve" <stevencan...@yahooooo.com> skrev i meddelelsen
> >> >news:4doev7561ipo35p13oh4jk9cuc7q2buu5o@4ax.com...
> >> >> On Fri, 6 Jul 2012 13:45:08 -0700 (PDT), SkyEyes <skyey...@cox.net>
> >> >> wrote:
>
> >> > snip
>
> >> >>>That's right - nobody knows the absolute truth (or indeed *anything*) -
> >> >>>about any "higher beings."  That's why the vast majority of the
> >> >>>atheists on this group are also agnostics.  Atheism is a statement of
> >> >>>belief; agnosticism is a statement about knowledge.  I don't know that
> >> >>>any higher being exists, therefore I do not believe in one.
>
> >> >> Actually, an agnostic atheist is someone who does not believe, but who
> >> >> does not deny the possibility.  Is that your position?
>
> >> > And an agnostic theist is someone who does believe but who does not
> >> > know.
> >> > Those theists who believe that the gift of faith is required in order to
> >> > believe can be said to not know.
>
> >> >>  See how
> >> >>>easy that is?
>
> >> >>>Brenda Nelson, A.A.#34 BAAWA Knight of the Golden Litterbox EAC
> >> >>>Professor of Feline Thermometrics and Cat-Herding skyeyes nine at cox
> >> >>>dot net OR skyeyes nine at yahoo dot com
>
> >> Fundies love to conflate possibilities with the false certainties of
> >> their beliefs.
>
> >So your pledged certainty that there is no god is due to your
> >fundamentalism. Glad to see you admit it. Kind of.
>
> Are you under the impression that there is any evidence that any gods
> exist or that anyone has ever described a god that could exist?
>
Are you under the impression that there is any evidence that god can't
possibly exist, and that every single description of a god or gods is
absolutely wrong and that such a being could not exist?

See how that works? It's called "faith" for a reason.

The problem with demanding "evidence" is, you have to believe that
something can happen before you can accept "evidence."
>
>
>
>
>
> >> A lot of atheists would acknowledge the possibility in a
> >> universe as big as ours that beings superior to ourselves with god-like
> >> powers might exist.  Some will even admit that in the lack of any
> >> evidence of what came before the big bang, any theory is on the table as
> >> to what caused it.
>
> >> So: they are agnostics.
>
> >No. This is the blind spot some of you evangelical atheists have that
> >makes you as frustrating to deal with as evangelical Christians. It's
> >called "faith" for a reason. Neither side can be proven correct. The
> >acknowledgement that nothing can be proven is "agnostic." But the term
> >"agnostic" doesn't work as a label. Because it's actually possible for
> >someone with an agnostic viewpoint to be either theist or atheist.
>
> >Ah, but labels are easy.
>
> >> But they look at the god described in the bible, the koran, or the talmud,
> >> and they see a logical impossibility; an absurdity on the face of it; an
> >> entity far less believable than space aliens or unicorns because unlike
> >> those, the god of the holy texts simply is not possible.
>
> >> So: they are atheists.
>
> >And therein lies the vacuousness of the evangelical atheist.
>
> >Tell me, Zepp. Does the fact that Abraham Lincoln didn't really hunt
> >and kill vampires (that we know of) mean that Abraham Lincoln didn't
> >exist? Does the fact that Shakespeare wrote a fictional account of
> >Julius Caesar's life mean that Caesar didn't exist?
>
> >MOST Christian clergy and theologians, when pressed, will tell you
> >that most of he Bible is meant as a teaching tool, and that the Bible
> >is not a history book. Yet, they're still Christian. Why? Because they
> >believe God exists, regardless of what humans have written about him/
> >her/it. Please explain for the class how proving that Jonah didn't
> >actually spend several days inside a "great fish" would prove there
> >can't be a god/creator.
>
> >Do you see the logical disconnect there? Even if you proved all the
> >stories in all of those books are complete bullshit, you cannot prove
> >there is no God. By the same token, if someone were able to prove that
> >many of the stories in the Bible actually happened, that still
> >wouldn't prove there IS a god.
>
> >You work just as hard to support your impossible-to-prove concept that
> >there can't be a god as the average Fundie does trying to prove
> >everything in the Bible is correct and there is a god. There's really
> >no difference; both are irritating.
>
> >> So it's possible to be one or the other, depending on which set of
> >> possibilities or impossibilities you are presented.
>
> >It's also possible to be both, since agnosticism is basically the
> >acknowledgement that God/no God cannot be proven either way, and
> >theists and atheists can do so.

Christopher A. Lee

7/7/2012 3:32:00 PM

0

On Sat, 7 Jul 2012 07:23:11 -0700 (PDT), Milt <milt.shook@gmail.com>
wrote:

>
>So your pledged certainty that there is no god is due to your
>fundamentalism. Glad to see you admit it. Kind of.

What a fucking moron. A liar as well as an idiot.

Why can't you brainwashed zombies understand that there is a real
world beyond your religious fantasies?

David Hartung

7/7/2012 3:41:00 PM

0

On 07/07/2012 09:43 AM, Free Lunch wrote:
> On Sat, 7 Jul 2012 07:23:11 -0700 (PDT), Milt <milt.shook@gmail.com>
> wrote in alt.atheism:
>
>> On Jul 7, 9:24 am, 3054 Dead <d...@gone.com> wrote:
>>> On Sat, 07 Jul 2012 14:38:07 +0200, thomas p. wrote:
>>>> "Steve" <stevencan...@yahooooo.com> skrev i meddelelsen
>>>> news:4doev7561ipo35p13oh4jk9cuc7q2buu5o@4ax.com...
>>>>> On Fri, 6 Jul 2012 13:45:08 -0700 (PDT), SkyEyes <skyey...@cox.net>
>>>>> wrote:
>>>
>>>> snip
>>>
>>>>>> That's right - nobody knows the absolute truth (or indeed *anything*) -
>>>>>> about any "higher beings." That's why the vast majority of the
>>>>>> atheists on this group are also agnostics. Atheism is a statement of
>>>>>> belief; agnosticism is a statement about knowledge. I don't know that
>>>>>> any higher being exists, therefore I do not believe in one.
>>>
>>>>> Actually, an agnostic atheist is someone who does not believe, but who
>>>>> does not deny the possibility. Is that your position?
>>>
>>>> And an agnostic theist is someone who does believe but who does not
>>>> know.
>>>> Those theists who believe that the gift of faith is required in order to
>>>> believe can be said to not know.
>>>
>>>>> See how
>>>>>> easy that is?
>>>
>>>>>> Brenda Nelson, A.A.#34 BAAWA Knight of the Golden Litterbox EAC
>>>>>> Professor of Feline Thermometrics and Cat-Herding skyeyes nine at cox
>>>>>> dot net OR skyeyes nine at yahoo dot com
>>>
>>> Fundies love to conflate possibilities with the false certainties of
>>> their beliefs.
>>
>> So your pledged certainty that there is no god is due to your
>> fundamentalism. Glad to see you admit it. Kind of.
>
> Are you under the impression that there is any evidence that any gods
> exist or that anyone has ever described a god that could exist?

Can you show that a "god" doesn't, and cannot exist?

The truth is that from a scientific position, there is no proof either way.

David Hartung

7/7/2012 3:50:00 PM

0

On 07/07/2012 09:23 AM, Milt wrote:
>
> Do you see the logical disconnect there? Even if you proved all the
> stories in all of those books are complete bullshit, you cannot prove
> there is no God. By the same token, if someone were able to prove that
> many of the stories in the Bible actually happened, that still
> wouldn't prove there IS a god.

Milt, I'm not certain that this is the best place for this question, but
suppose that those who study ancient history were able to prove that a
Jewish rabbi named Jesus did actually exist. Suppose that these scholars
were able to show that this rabbi was crucified, that he was buried and
that several days later this he did in fact rise from the dead and walk
the earth again. Would that be evidence that there is actually a god?

Do not get me wrong, I am not claiming that such proof exists outside of
scripture, I am merely asking the question out of curiosity.

David Hartung

7/7/2012 3:53:00 PM

0

On 07/07/2012 10:02 AM, 3054 Dead wrote:

> Liar. Milt, I said the god as described in the bible is a logical
> absurdity.

Really? How do you figure?

>>> So it's possible to be one or the other, depending on which set of
>>> possibilities or impossibilities you are presented.
>>
>> It's also possible to be both, since agnosticism is basically the
>> acknowledgement that God/no God cannot be proven either way, and theists
>> and atheists can do so.
>
> "God" is easily disproven, unless you reduce him to the status of
> personal opinion.

Yet to this date, no one has been able to disprove God.