How to change URL of a page on button click and change the Keywords & Description of a page in asp.net? - asp.net

I have a .aspx page which show items hierarchically(4Levels) depending on selected category(Level1). I want to change the URL on button click of specific Hierarchy say Level1, Level2, Level3, Level4 and accordingly change the Keywords & Description of a page depending on Clicked Item of specific Level.
Similar to this link
Eg:
When we click on CellPhones it shows different keywords & description in meta tag
When we click on CellPhones->BlackBerry-> it shows its related keyword & description in meta. And most important is the URL also changes at every CLICK.
Please can any one suggest me to do the same in asp.net.
Note: I am using Visual Studio 2008 Framework 3.5

Try looking at the History API (part of HTML5 so it works in all modern browsers) - specifically history.pushState().
http://html5doctor.com/history-api/
Example: http://html5doctor.com/demos/history/
Good luck.

Related

adding new menu in Select (All,Inverted Selection) in Alfresco Share

I am newbie to the Alfresco.Now my requirement is how to add new menu[All(All pages)] in Select. wherever user perform search function lets say 250 results have found & user selects All in page 1 & its selecting only current page results and not selecting entire 250 records & then user goes page by page can edit the properties for the entire 250 records.in the new functionality if user selects [All(All pages)] then all records should be selected & edit the properties for 250 records at one go.So I want to add new menu with All(All pages) & change the existing menu current labels as All(Current Page).How to achieve this functionality and what files need to changed.How should i know that which files are currently used?Is there any debugger can be used to know the files?
Alfresco Version
4.2.e
My guess, is that if you go through this previous version of Jeff Potts' Tutorial you will be able to figure this out by yourself.
Simplest option is to edit label of that particular action in out of box property file.
You can find it under
<ALF_HOME>\tomcat\webapps\share\WEB-INF\classes\alfresco\messages\slingshot.properties
This entry
menu.select.all=All
Change label here and it will be reflected.
NOTE: It is not best way to implement this. Ideally you need to override property file and change label
The issue here is that only the items shown on the page have been loaded. This means that the metadata for the items not shown on the page won't be available. The metadata of each node is used to evaluate it's applicability to any action. If the node is locked or has had its permissions changed then it won't be possible to edit it. This is why "all" only means all items on the current page of data.

OnClick on ticketid need to open a details of ticket using birt report

I had a requirement to create a report based on individual user whom having SR waiting for approval, On click on Ticket id the URL's should redirect to SR detailed page where he can check request approve or disapprove.
using hyper link in birt properties unable to pass the ticketid by using below url's
http://google.com/maximo/ui/maximo.jsp?event=loadapp&value=asset&additionaleventvalue=Ticketid
Could you anybody help in this regards.
If the cell you made clickable contains the ticketId, go to Properties -> Hyperlink -> Edit...
Select hyperlink type URI, and click the dropdown to the right of 'Location' to go to the Javascript window.
If you're going to use it more than once, I would make the static part of your hyperlink a variable. Then add the ticketId by clicking "column bindings" in the left-lower column in the JavaScript window and selecting the appropriate cells in the middle and right columns. You'd get something like
vars["staticPartOfHyperlink"] + row[TICKETID]
If you'd rather not use a variable, you can hard-code the static part (don't do this, it's ugly and asking for trouble):
"http://google.com/maximo/ui/maximo.jsp?event=loadapp&value=asset&additionaleventvalue=" + row[TICKETID]

How to get AppointmentID on a buttonclick

I have created an outlook add-in where i have a ribbon that adds a button to the appointment tab. This button has a callback method that opens IE and goes to a specific page.
What i need: When you create an appointmnet and ID is stored somewhere(i assume).
I need to get the ID of the appointment that i have opend when i click on my button.
Simplify:
click on an appointment----->appointmnet has a costom button---->click the button--->open a page with the appointmentID.
I need to get the ID and add it to the url paramater when i open the page.
I have been reading up on the appointment global ID here:
http://msdn.microsoft.com/en-us/library/office/ff863645.aspx
And all the links that follow that article but I have not found anything that can help.
Im glad i have friends who know this better than me...
soloution here:
Outlook Ribbon Load Inspector.CurrentItem is null

open a page to new window/tab from iframe

I have a page with an iFrame on it.
On the page in the frame I have a button.
What I want is that if the user clicks on the button, another page is opened in it's own new window or tab. This functionality is to show the user a print friendly page.
How can I do this?
This is how I now try it:
Dim sb2 As New StringBuilder
sb2.Append("window.open('")
sb2.Append(sb.ToString)
sb2.Append("','NewPFWindow','menubar=1,toolbar=1,scrollbars=1,resizable=1,sandbox=""allow-same-origin allow-forms""')")
ClientScript.RegisterClientScriptBlock(Me.GetType, "si2", sb2.ToString, True)
sb holds the page like "mypage.aspx"
Another option is to resize the iFrame so the whole page will fit. Is that possible from code-behind?
rg.
Eric
Just provide a target that has not been named on your site yet, most people will use _blank for that
I.e.
link text
or if you want to tie that to another click-event somewhere else:
window.open('desiredLocationUrl....', "_blank");
Btw. it does not matter if that link is inside an iframe ;)
found it.
Apparently Chrome uses an undocumented feature.
The frame that is trying to put the new page in it's own window or tab, needs an extra option in the sandbox property called "Allow-popup'.
This is not documented on the w3schools.com website.
So by adding this to the sandbox property, you allow the browser to create new window/tab.

creating help for asp.net website

My requirement is to have database based help system for asp.net website, as shown in the image below. i have searched web but could not find even remotely related solution.
DNN Help System http://img3.imageshack.us/img3/6720/dnnhelpimage20091125.jpg
You could assign each help item a unique ID (perhaps GUID to make it easier to generate by the developer enabling help for that item).
Clicking on the link opens a dialog, tooltip, new window, whatever. Just have the UI load the help text by ID from the database.
To make this easier to implement in the UI, there are a few ways. Perhaps you can create a jQuery client-side behavior.
your HTML would look something like:
<span class="help" id="#{unique-id-here}">Admin</admin>
and you could have jQuery on DOM load:
$(function() {
var help = $(".help");
help.prepend("<img src=\"path/to/images/help.png\" />");
help.click(function() {
//do something with this.id; open a popup, a title bar, whatever.
}
});
We did it on our site by doing the following:
We have a HelpTopics database with a HelpTopicId and HelpTopicText
We create an aspx page that displays the HelpTopicText based on the HelptopicId passed in the querystring.
We set up a css class for the A tag that displays the link to the help with the question mark image.
We created a UserControl named TitleandHelp that contained a link to the page mentioned in step 2 and the style for the link set to step 3 above: The usercontrol has a public rpoperty for the title and one for the topicID (We called it HelpContext).
We add the usercontrol to the aspx page where appropriate
<uc2:titleandhelp ID="titleandhelp1" runat="server" HelpContext="4" PageTitle="Forgot Password" />
it may sound like a lot of work, but really it only takes a half hour or so to do all of the setup. The rest of the work lies in populating the table and dragging the usercontrol onto the pages where appropriate.

Resources