open webpage (or snapshot of webpage) into another webpage though vb.net - vb.net

i have an aspx page with vb.net back end. in that page i get names and url's from the database depending on different conditions. My requirement is that when i get the url, the code should then use that url and have that webpage in a small preview form on my existing aspx page.
so basically i have a table as follows -
Name URL Preview-URL
Sandy www.myspace.com/sandy -- should be the url webpage in specified height and width.
Mandy www.myspace.com/mandy -- should be the url webpage in specified height and width.
does anyone know how i can achieve this?

You can create small url previews by using the iFrame tag. Let's say you have an asp:PlaceHolder control called "iframePlaceholder" in your aspx. In your code behind you could do something like:
Dim iframeControl As New LiteralControl("<iframe src=""www.myspace.com/mandy"" width=""100px"" height=""300px"">")
iframePlaceholder.Controls.Add(iframeControl)

Related

Qlikview URL parameter selection not working due to cache

I am trying to embed a Qlikview chart in a custom webpage via an iframe - using singleobject.htm. I want to apply a certain filter so i am passing "&select=LB186,CSP" where LB186 is the listbox in the actual qlikview document.
This "select" paramater in the URL doesnt seem to work because of caching. I also tried to replace LB186 by the actual field name, that did not work either.
I want to somehow clear cache and load the page as a fresh reload. appending a random var=XXX hack also doesn't work. Any clue?
You can try to use bookmark instead
alternative url below, please remember that here document part is url encoded:
https://$servername/qvajaxzfc/authenticate.aspx?type=html&try=/qvajaxzfc/singleobject.htm?document=example.qvw%26object%3DDocument\CH1&back=/LoginPage.htm&webticket=$ticket

CRM 2013 WebResource IFrame

I have an HTML web resource in an opportunity that produces a css tab control containing all children opportunity to the current record.
I do this through Ajax and javascript and everything works fine, a new tab is made for each child and it shows an opportunity record inside; the only issue is that it will only show the current record inside of this tab - effectively creating an endless loop.
If I paste the URL from the IFrame into the browser it shows the proper record using the right form that I specify(one that doesn't contain another web resource).
Does anyone know why it wouldn't show the same form as it navigates to? If I try google.com it works, just not for this URL:
http://server/CRM/main.aspx?etn=opportunity&pagetype=entityrecord&navbar=off&id=%7B"+val.OpportunityId+"%7D&extraqs=formid%3DC1EC704C-D29B-4786-806F-195D0A80CF07%0D%0A#255409204
Try constructing the URL with this format:
http://server/CRM/main.aspx?etc=3&extraqs=formid%3dC1EC704C-D29B-4786-806F-195Dā€Œā€‹0A80CF07%7d&id=%7b<EnterOppIdHere>%7d&pagetype=entityrecord
Use the Entity Type Code (etc parameter) instead of the Name (etn) and note that everything after that should be part of the extraqs parameter.

how to prevent changed url in the browser bar from reflecting in the website content?

how to prevent the change in the url of the browser bar from reflecting in the website content's URLS...
here is the situation,
in my current web app, I am using this
$this->createUrl(Yii::app()->controller->id ."/". Yii::app()->controller->action->id, $params)
to generate href of the hyperlinks... now the problem is,
when I type in the browser bar like e.g
www.mysite.com/blahblahblah/subcategory/c1
the blahblahblah, also reflects to the webpage content hyperlinks,because of the Yii::app()->controller->id that I passed to the createUrl function...any work around for this ?..., what i want to happen is, no matter what string is typed in the place of the controller name via the browser bar, it won't reflect in the webpage content hyperlinks ..
so how ?
the answer was, I took the ID from the URL ,created a simple Helper function and used that to return the correct value of category/subcategory and outputs it in the view source no matter what change is done via the browser bar

fixed url on address bar - show only base url http://www.mysite.com

I need to show on the address bar just the first part of the url of my site.
For example for any page with name like
http://www.mysite.com/mypage.php or
everything else
I want to see just http://www.mysite.com on the address bar of the browser.
How this can be achieved?
I tried with apache RewriteRule but with no result.
Apart from being a really bad idea for people actually trying to use your site, there is no way you can do this on the server side, because the server needs to know which page was accessed - that's what a URL is for. What you are looking for is to make it appear to the user that they are still at the same URL.
This is easy enough if you put your entire site in an HTML frameset with one frame, or an iframe sized to fill the browser window. This does require all external links to have target="_top", and without additional JS people can break out of the frame and access the pages individually anyway.
An alternative approach, that will only work on some browsers, would be to use history.pushState to fake the address bar back to / every time a new page loads.

Hotlinking: How do I differentiate between an image in a <img> tag versus an image link?

I want to allow partial hotlinking to images on my website. I want to allow a specific site (Reddit) to be able to show an image from my website on their page, but if they click on the link to the image from that site, it should go to an image viewing page, rather than directly the image itself.
For example:
This other website should be able to have this
<img src="http://mySite.com/myImage.jpg"/>
on their page, and it should show the image. However, if they have this:
Link Text
A user who clicks on that link should get redirected to an image viewing page that contains some html, including the image, rather than directly to the image.
I'm trying to achieve this via mod_rewrite. However, those two cases have the same HTTP_REFERER. Is there anyway for my server to differentiate between that?
There is no way to do such thing! but if second site is your you can put optional query string at the end of URL the distinguish between them!