This is a migrated thread and some comments may be shown as answers.

[Solved] RadOpen and URL's

4 Answers 118 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eugene
Top achievements
Rank 1
Eugene asked on 27 Apr 2010, 11:15 PM
Greetings,
    Given the following html img element, which uses radopen, which accesses an image perfectly when running the application
in the test environment under Visual Studio 2008 Professional Edition under Microsoft Vista,

 

<img src="../Content/Images/toolbar/AddRecord.gif" title="Add Article" style="border-width: 0px; vertical-align: bottom;" />&nbsp;<a href="javascript:" onclick="radopen('<%# Url.Action("Create", "Article") %>', 'RadWindow1')" style="color: #FFFFFF">Add Article</a>&nbsp;

Could you tell me what the url for the image should be so that it can be accessed when the app is running of the Server?
P.S.  And by the way, how to you use the "Format Code Block" mentioned above?

Thanks in advance,
Eugene



 


4 Answers, 1 is accepted

Sort by
0
IQworks
Top achievements
Rank 1
answered on 28 Apr 2010, 12:54 AM
Hi Eugene,
        You could try letting intellisence guide you to the image for "src=" by erasing what you have and placing the "=" sign by the "src".  if not check out using the tilda " ~ " in your URL.
        In case you have not seen this, here is a page that shows Window samples.
http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx
        Dont know if you already know this, but here is where the Telerik "Window" forum is . 
http://www.telerik.com/community/forums/aspnet-ajax/window.aspx
  
0
IQworks
Top achievements
Rank 1
answered on 28 Apr 2010, 12:55 AM
 HI again,
   Forgot the code block. up above where you see this, the icon second from the right is the format code block. Click it, copy and paste your code and follow the keys.
0
Atanas Korchev
Telerik team
answered on 28 Apr 2010, 07:16 AM
Hello,

You should use Url.Content() for such tasks:

<img src="<%= Url.Content("~/Content/image.gif") %>" />

All the best,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Eugene
Top achievements
Rank 1
answered on 28 Apr 2010, 09:56 PM
Thanks IQWorks and Atanas,
    Atanas' answer of using Url.Content works perfectly. 
Sincerely,
 Eugene
Tags
General Discussions
Asked by
Eugene
Top achievements
Rank 1
Answers by
IQworks
Top achievements
Rank 1
Atanas Korchev
Telerik team
Eugene
Top achievements
Rank 1
Share this question
or