"Anne Butera" <> wrote in message
news...
>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

"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" <> wrote in message
> news...
> >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 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" <> wrote in message
>> news...
>>> 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

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!