I am sorry but I tried this one and it still doesn't work.
<wmx:AccessData SourceControl id="AccessDataS ourceControl1" runat="server"
ConnectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0; Ole DB Services=-4; Data
Source= <%# Server.MapPath( "/nrcweb2/db/contact.mdb") %>"
SelectCommand=" SELECT * FROM [ContactInfo]"></wmx:AccessDataS ourceControl>
The parser assumes the end of the string once it encounters an " . I have
tried ' instead of " but still doesn't work, although it gives different
error:
<wmx:AccessData SourceControl id="AccessDataS ourceControl1" runat="server"
ConnectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0; Ole DB Services=-4; Data
Source= <%# Server.MapPath( '/nrcweb2/db/contact.mdb') %>"
SelectCommand=" SELECT * FROM [ContactInfo]"></wmx:AccessDataS ourceControl>
Can you please write the complete corrected tag?
Sorry for the trouble, I appreciate your help
Mostafa
"Patrik Löwendahl" <pa************ **@csharpsweden .com> wrote in message
news:u9******** ******@tk2msftn gp13.phx.gbl...
Sorry, remove the & and ad an ending "
--
Patrik Löwendahl
cshrp.net - " Elegant code by witty programmers "
cornerstone.se - " IT Training for professionals "
"Mostafa" <mo*****@nospam .com> wrote in message
news:_YZlb.1680 3$B_2.13775@oke pread02... It is still not working:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 22: </p>
Line 23: <p>
Line 24: <wmx:AccessData SourceControl
id="AccessDataS ourceControl1" runat="server" SelectCommand=" SELECT *
FROM [ContactInfo]" ConnectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0; Ole
DB Services=-4; Data Source=" & <%#
Server.MapPath(/nrcweb2/db/contact.mdb") %></wmx:AccessDataS ourceControl>
Line 25:
Line 26: <wmx:MxDataGr id id="MxDataGrid1 " runat="server"
AutoGenerateFie lds="False" DataKeyField="M essageID"
DataMember="Con tactInfo" DataSourceContr olID="AccessDat aSourceControl1 " BorderColor="#C CCCCC"
AllowSorting="T rue" BackColor="Whit e" CellPadding="3" BorderWidth="1p x"
BorderStyle="No ne">
Source File: D:\nrcweb2\cont act2.aspx Line: 24
Mostafa
"Patrik Löwendahl" <pa************ **@csharpsweden .com> wrote in message
news:On******** ******@TK2MSFTN GP12.phx.gbl... You need to include the vb.net code within server script tags like so:
<wmx:AccessData SourceControl id="AccessDataS ourceControl1" runat="server" SelectCommand=" SELECT * FROM [ContactInfo]"
ConnectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0; Ole DB
Services=-4; Data Source=" &
<%# Server.MapPath(/nrcweb2/db/contact.mdb") %>
></wmx:AccessDataS ourceControl>
--
Patrik Löwendahl
cshrp.net - " Elegant code by witty programmers "
cornerstone.se - " IT Training for professionals "
"Mostafa" <mo*****@nospam .com> wrote in message
news:RmZlb.1670 4$B_2.9560@okep read02...
> Hello,
>
> I need to use a relative URL path instead of the system path inside
the > <wmx:> tag in the following code:
>
> <wmx:AccessData SourceControl id="AccessDataS ourceControl1"
runat="server" > SelectCommand=" SELECT * FROM [ContactInfo]"
> ConnectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0; Ole DB Services=-4; Data
> Source=D:/nrcweb2/db/contact.mdb"></wmx:AccessDataS ourceControl>
>
>
> I have tried to do it this way,
>
> <wmx:AccessData SourceControl id="AccessDataS ourceControl1"
runat="server" > SelectCommand=" SELECT * FROM [ContactInfo]"
> ConnectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0; Ole DB Services=-4; Data
> Source=" &
> Server.MapPath(/nrcweb2/db/contact.mdb")></wmx:AccessDataS ourceControl> >
> But I always get a parser error. It seems that functions cannot be
evaluated
> within the tag.
>
> Please help me
>
> Thank you
>
> Mostafa
>
>