we have requirement currently as shows in below image.
have googled much but i don't have specific key word so i couldn't find any thing.
we have a requirement to display link in navigation bar so user can select appropriate page without going forth and back ...by directly selecting the required page link.
how could it be possible to do inside asp.net as i have shows in image below.
Thank you so much........
You can have a look at Navigation here http://www.w3schools.com/aspnet/aspnet_navigation.asp and Site Map here http://msdn.microsoft.com/en-us/library/yy2ykkab.aspx
As basic as it can be, you can use a list on the pages where you want to show links.
Let's say you have three pages A, B and C. On each page add a list like below.
So you go about like this
<span>You are here</span>
<ul id="navList" runat="server">
</ul>
On page A's codebehind add the following to your list.
HyperLink nav=new HyperLink();
nav.NavigateUrl="A.aspx";//You can also pass parameters here.
HtmlGenericControl li=new HtmlGenericControl("<li>");
HtmlGenericControl span=new HtmlGenericControl("<span>");
span.InnerText=">>";
li.Controls.Add(span);
li.Controls.Add(nav);
navList.Controls.Add(li);
Similarly for B
HyperLink nav=new HyperLink();
nav.NavigateUrl="A.aspx";//You can also pass parameters here.
HtmlGenericControl li=new HtmlGenericControl("<li>");
HtmlGenericControl span=new HtmlGenericControl("<span>");
span.InnerText=">>";
li.Controls.Add(span);
li.Controls.Add(nav);
navList.Controls.Add(li);
HyperLink nav2=new HyperLink();
nav2.NavigateUrl="B.aspx";//You can also pass parameters here.
HtmlGenericControl li2=new HtmlGenericControl("<li>");
HtmlGenericControl span2=new HtmlGenericControl("<span>");
span2.InnerText=">>";
li2.Controls.Add(span);
li2.Controls.Add(nav);
navList.Controls.Add(li2);
And similarly for C.
Related
Can any one give me an example on how to build a bootstrap navbar within an asp.net website dynamically from database according to the role of the logged user (sth like populating asp menu) and keeping the same style of the navbar.
any help will be very appreciated as i have searched too much and i can't find a solution.
The nav bar in twitter bootstrap is essentially just an unordered list. So make the code as neat or as messy as you prefer, but create a div with an id and a runat="server", and reference that in your code behind. For example, your markup could read:
<div id="myNav" runat="server"/>
In your code behind, read your data items from the database, generate the appropriate HTML, and write it to the DIV. One such example:
Dim sb as New Stringbuilder()
sb.append("<ul>")
sb.append("<li>Item 1</li>")
sb.append("<li>Item 2</li>")
sb.append("</ul>")
myNav.InnerHTML = sb.ToString()
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]
<a href="account_step.asp?oid= %=request.querystring("oid")%>&cid=
<%=request.querystring("cid")%>&sid=<%=request.querystring("sid")%>
#cert">Certification</a>
Thats just one example of one of my long anchor links Works fine. But when I submit a form which also uses a hyper-link and a save variable to redirect, and then click on the anchor links like the one above, it goes to the wrong tab page.
oid=<%=request.querystring("oid")%>&cid=<%=request.querystring("cid")%>
&sid=<%=request.querystring("sid")%>&save=true#more
Doies anyone know of a similar problem going from one anchor link to another?
But when I submit a form which also uses a hyper-link and a save
variable to redirect, and then click on the anchor links like the one
above, it goes to the wrong tab page.
What I suspect is happening is that you're POSTing your form and since those variables are looking for query string variables, they're not found on the next page.
The quickest fix would be to update your form like so:
<%
Dim oid, cid, sid
oid = Request.QueryString("oid")
cid = Request.QueryString("cid")
sid = Request.QueryString("sid")
%>
<form action="formpage.asp?id=<%=oid %>&cid=<%=cid %>&sid=<%=sid %>&save=true#more" method="post">
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.
I've implemented a menu for my asp.net page containing some hyperlinks and loading different contents on their clicks, it's using jquery on behind for it's style mostly and it is working fine. But the problem is, what if a refer to this menu from the outside, i can refer to each of the menu items, i pass parameters on querystring, now i can find which item is clicked but how can i force that hyperlink menu item to be clicked on page load. I'm specifing just their navigation urls, how can i specify that if something is passed in querystring than that specific menu item should be forced clicked on pageload.
Any ideas? Thanks in advance.
The real question lies can you cuase a hyperlink click event?
Now I'm using
Page.ClientScript.RegisterStartupScript(typeof(Page),"test1", "<script>document.getElementById('linkButtonId').click();</script>"); but still nothing desirable happens, seems that this row has no effect at all.
Whether the functionality being executed is client side or server side, it might be a good idea to create a function that will accept the id or something of the menu item being clicked and then handle it appropriately.
Thus all the menu items will call the same function. And since you have the parameters in the query string just pass them through to the function which will handle it accordingly and display the correct content?
You need a bit of separation...
Whatever your click does can be moved into a function, then you can call the function on the click of the menu - but you can also call the function at other times as well.
Before:
<a ... onclick="alert('hello');">Click Me</a>
After:
<a ... onclick="fnSayHello();">Click Me</a>
...
var fnSayHello = function() { alert('hello'); };
fnSayHello();