RE: [CLOSED] Using ~ In Urls
Does the following work for you...
Example
Code:
Url='<% Html.ActionLink() %>' AutoDataBind="true"
RE: [CLOSED] Using ~ In Urls
Nope.
Here is my sample:
Code:
<ext:HttpProxy Url='<% Html.ActionLink(new { controller = "Jobs", action = "Data" }) %>' AutoDataBind="true" Method="GET" />
which outputs this in the page:
Code:
proxy:new Ext.data.HttpProxy({url:"<% Html.ActionLink(new { controller = \"Jobs\", action = \"Data\" }) %>",method:"GET"})
RE: [CLOSED] Using ~ In Urls
A further update:
If I do:
Code:
<ext:HttpProxy Url='<%# Url.OpsDataStore() %>' AutoDataBind="true" Method="GET" />
Which is basically an extension function to UrlHelper then no Url is put into the ext proxy object on the page:
Code:
proxy:new Ext.data.HttpProxy({method:"GET"})
This is how I have been doing databindings with ext:HiddenField components (<%# instead of <%).
RE: [CLOSED] Using ~ In Urls
Hi,
I confirm that under ASP.MVC the AutoDataBind is not work. Not sure why. We will investigate it. At this moment I can suggest to set required properties at code-behind. We will try to fix it soon
RE: [CLOSED] Using ~ In Urls
Thank you for the reply. Do you have any hints as to where the problem may lie such that I could do some debugging myself?
We are planning to release our software within the next few weeks and so it is critical that I can get this working. Unfortunately I cannot set the paths in code-behind because depending on different install locations at different customers the Urls will be different.
RE: [CLOSED] Using ~ In Urls
Hi,
I am not sure where the problem yet. In usual ASP.NET application all works fine.
Why you can't set property in code-behind? Just set value depends from current user, use the same function which you try in <%# block
Code:
protected void Page_Load(object sender, EventArgs e)
{
((HttpProxy)Store1.Proxy[0]).Url = Url.OpsDataStore();
}
RE: [CLOSED] Using ~ In Urls
Ah yes my fault sorry - I was thinking code-behind as in the markup for some reason. I will try your suggestion and let you know how that goes.
RE: [CLOSED] Using ~ In Urls
I can confirm that that solution works in the interim.
Thank you.