Web Forms :: Creating Unique Details Pages From Databound Hyperlinks?
Mar 15, 2011
I'm currently making a site that is supposed to generate search results from a separate assembly, with a gridview that has links to each robot. The links from the gridview are supposed to link to a unique robot details page, as well as display another gridview to all related robots from the set, like this:
[IMG]http://www.sawauto.com/uploader/up/2011-03-14_132416.jpg[/IMG]
how to display unique detail pages. So far, I only have a details page template, but I'm trying to figure out how I can display the data dynamically, depending on which robot was selected from the main search.
Here are my Default.aspx and Details.aspx mark-ups so far:
Default Pastebin
Details Pastebin
And the resulting Default and Details pages:
[IMG]http://www.sawauto.com/uploader/up/2011-03-14_133933.jpg[/IMG]
[IMG]http://www.sawauto.com/uploader/up/2011-03-14_133107.jpg[/IMG]
View 1 Replies
Similar Messages:
May 10, 2010
I have a stored procedure (For Eg: sp_GetAvlData) that accepts a number of parameters, 3 of which are TimeFrom, TimeTo (as varchar) and TimeInterval (as int), formulates a Dynamic query and executes itself. So for instance, if I call the proc as follows:
[code]....
dtAvl is the datatable containing the results of my stored procedure.
The next step for me is to make each of the cells (except the cells in the first column) as a Hyperlink so that when clicked upon a cell, it populates 2 textboxes with the selected Timeslot and Name or ID (ID field is not displayed in Gridview). The textboxes are located on the same page but outside of the Gridview control.
The Challenge that I'm facing out here are:
1) As you can see, the field names being generated are not fixed and I have no control over them.
2) Because the field names are not fixed I'm not sure I can implement this using the Templatefields or BoundFields of Gridview.
Is there any way to achieve the Hyperlinking of these cells within the Gridview?
View 3 Replies
Apr 28, 2010
I have a gridview with a hyperlink control that allows the user to save pages to it (www.google.ca, asp.net, etc). Unfortunately it always adds the server name to the beginning of their link. [URL] I was wondering is there any way to change that within the control. or should I have it pass a query string to a url handler that will response.redirect them to their actual page?
View 3 Replies
Dec 16, 2010
I'm trying to build an edit column, but my routine isn't quite right for some reason. My value of "store" is not returning anything like I thought it would.
function editLinkRenderer(value, metadata, record, rowIndex, colIndex, store) {
if (store == V2020.ServiceStore)
return '<a href="javascript:editServices(' + value + ')">Edit</a>';
else if (store == V2020.PriceStore)
return '<a href="javascript:editPrice(' + value + ')">Edit</a>';
else if (store == V2020.PromoStore)
return '<a href="javascript:editPromo(' + value + ')">Edit</a>';
return "Edit";
}
I'm using it in my gridpanel like so:
{ header: "Edit", width: 60, dataIndex: 'serviceID', sortable: false, renderer: editLinkRenderer },
View 2 Replies
Feb 4, 2011
I have an easy problem for the experts here...been a few years since my last development work. I have an appl that will track complaints. When an administrator logs in, they go to the main admin.page. From there, they can create a new complaint record-here is where i'm stuck and am looking for a better way. When the admin loads the create.aspx page. i need a way go generate a unique number that i can insert into the db. What is the best way to generate the number...i don't care whether it's numerical or combo, just unique and durning postback the number does not change...the number will be given out as a reference back to the complaint... This seems pretty standard but I can't think of a way that will not duplicate numbers and am looking for best practice with low
View 3 Replies
Apr 25, 2010
can any one tell me how to create a popup details page?
View 2 Replies
Aug 23, 2010
i like to have unique ids for textboxes and hidden filds .is there any property which will give unique id in asp.net ?
something like
<asp:textbox id="ctr001_1" runat="server" uniqueid="textbox" />
View 4 Replies
Jan 25, 2010
what the best way to create text boxes in my loop here so that the IDs are unique instead of just "TextBox" for all of them. I need to add up the Price based on the Price per unit and the Quantity.
My items are loaded from a database so there could be any number of them, so I need to generate the fields on the fly. I was thinking maybe an array of fields could be used like in a form application, or is this not the right way to go?
Here is my code:
[code]....
View 2 Replies
Nov 24, 2010
i want to create a details description of a particular row in a data grid when i move the mouse over the gridview row,am using the c# as back code file, for example i have to pop up a panel control with details when i move the mouse over the gridview row .should i use any ajax control?.
View 3 Replies
Jan 4, 2011
I'm going to write my own Authentication module and I need a unique identifier base on users requests header , I think [(user IP)+(user Agent)] can be reasonable but I know it's not completely safe do you know any other options or methods?
View 3 Replies
Jun 28, 2010
First of all here is my code chunk.
[Code]....
Right now I am creating this session with the session key "PhonePart" which is also the name of object I am passing in as a parameter in first method. In subsequent methods, I use the the same name to retreive and clear session value. My problem is, this approach works fine If I instantiate a single object of the class where these methods are defined and using that object call the methods, but when I create another instance of the same class and calls for instance method AddToSession and pass that instance, it overwrites the session value stored by the first instance of the class as the session key is the same that is "PhonePart".
Considering this scenario, is it possible that I somehow grab the name of the object as string in the calling method say "AddToSession" and create a session with that name? If Yes, then I can do the same in subsequent methods and retreive session value and also clear the session specific to that instance name without affecting the other session values stored by other instances.
View 5 Replies
Aug 25, 2010
Is GUID (globally unique identifier) really unique, or it can be duplicate.
System.Guid.NewGuid().ToString()
View 6 Replies
Jan 9, 2010
I need to create aspx pages on the fly or at the runtime.I read that creating a template page and posting content to the page would be a solution, in a few posts in the forum. Can i get information on this method.
View 5 Replies
May 10, 2010
i have a FormView, and i already have a Label control that gets the value of theselected propery inside the FormView, so each time the FormView displays data, i have a Label control that displays individual values, according to the value of the FormView, here is the code:
[code]....
What i would like to do is to know how i could add a DataList instead of a Label, and then each time the FormView databinds an item, to show the value of the DataList How would i go about doing that?
View 10 Replies
Feb 2, 2010
I'm working on master pages. And I would like to create tabs much like firefox tabs sharing sessions which need to navigate on different pages.I tried many solution but all comes into vain.
View 3 Replies
Mar 14, 2010
I have a gridview that displays some records....i have added a new column to it called Edit....now when i click the edit link it should take me to a new page where i can edit that particular record only.....how do i go about it? I am using forms and no inbuilt ASP.NET controls except gridview....so i need to write queries for the same.....plz post code if possible
View 14 Replies
Jan 4, 2011
I am working on a medium size web site and I am kind of stuck. I need to do the following
1- admin user fill a form and submit (Done)
2- the system create new page storing the info provided in step 1
how can I do that? I need a page to be created I don't want to read the data from data base and display it on a template
View 1 Replies
Nov 23, 2010
How to get Unique ID of LDAP logged in User? Is GUID is the unique id of each user?
View 1 Replies
Mar 21, 2011
How generate the unique no. 1,2,3 and so on .... on button click of each new user ..
the code mentioned below is a readwrite coding in vb.net ...
but the problem is it generate the same id for different users on button click event... but i want the no. of times button clicked the new ids will be generated
[code]....
View 1 Replies
Mar 18, 2011
How can I get unique session ID for every unique user who logs in ?? I'm using asp.net/c#
View 1 Replies
Feb 11, 2010
How To Display Data In Following Format?
In the Format below abc has multiple occurance which count is displayed in brackets as 2669.
[code]....
View 7 Replies
Apr 12, 2010
I have on a page a gridview that can be filtered with one text box. I set up the gridview to show select and wanted to then connect a details view so that when you selected a row the entire details would show up. When I run it I get this error. Data keys must be specified on GridView 'GridView1' before the selected data keys can be retrieved. Use the DataKeyNames property to specify data keys.
<%@ Page language="C#" masterpagefile="MainContent.master" title="Electrical Storage" EnableEventValidation="false" %>
<asp:Content id="Content1" runat="server" contentplaceholderid="Content">
<div id="Rightside">
<h2>Search Electrical Storage
</h2>
<li><a href="EStorageResultsAll.aspx">View All Files</a></li>
<li>Specify Projects to View</li>
<br />
<br />
<form>
Search: <asp:TextBox id="Search" runat="server"></asp:TextBox>
(% is wildcard)<br /><br />
<asp:Button runat="server" Text="Search" id="Button1"
PostBackUrl="electrical_storage.aspx" Height="26px" BackColor="#000066" ForeColor="White" Width="129px"></asp:Button>
<br />
<hr />
<asp:GridView id="GridView1" runat="server" AutoGenerateColumns="False" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" DataSourceID="AccessDataSource1" ForeColor="Black" Width="820px" AllowSorting="True">
<RowStyle BackColor="White" />
<Columns>
<asp:commandfield ShowSelectButton="True">
</asp:commandfield>
<asp:boundfield DataField="CoID" HeaderText="Co ID" SortExpression="CoID">
</asp:boundfield>
<asp:boundfield DataField="ProjClass" HeaderText="Project Class" SortExpression="ProjClass">
</asp:boundfield>
<asp:boundfield DataField="Project" HeaderText="Project" SortExpression="Project">
</asp:boundfield>
<asp:boundfield DataField="FileName" HeaderText="File Name" SortExpression="FileName">
</asp:boundfield>
<asp:boundfield DataField="FileAddInfo" HeaderText="File Add Info" SortExpression="FileAddInfo" Visible="False">
</asp:boundfield>
<asp:boundfield DataField="FileNumber" HeaderText="File Number" SortExpression="FileNumber" Visible="False">
</asp:boundfield>
<asp:boundfield DataField="BoxNumber" HeaderText="Box Number" SortExpression="BoxNumber" Visible="False">
</asp:boundfield>
<asp:boundfield DataField="Location" HeaderText="Location" SortExpression="Location" Visible="False">
</asp:boundfield>
</Columns>
<FooterStyle BackColor="#CCCCCC" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#000066" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="\Elec1DATABASEStorageElectricalFilesBook.mdb" SelectCommand="SELECT [CoID], [ProjClass], [Project], [FileName], [FileAddInfo], [FileNumber], [BoxNumber], [Location] FROM [FilesWithLocation]
WHERE (([CoID] LIKE '%' + ? + '%') OR ([ProjClass] LIKE '%' + ? + '%') OR ([Project] LIKE '%' + ? + '%')OR ([FileName] LIKE '%' + ? + '%')OR ([FileAddInfo] LIKE '%' + ? + '%')OR ([BoxNumber] LIKE '%' + ? + '%'))">
<SelectParameters>
<asp:controlparameter ControlID="Search" Name="CoID" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="ProjClass" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="Project" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="FileName" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="FileAddInfo" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="FileNumber" PropertyName="Text" Type="String" />
<asp:controlparameter ControlID="Search" Name="BoxNumber" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:AccessDataSource>
<asp:AccessDataSource id="AccessDataSource2" runat="server" DataFile="\Elec1DATABASEStorageElectricalFilesBook.mdb" SelectCommand="SELECT * FROM [FilesWithLocation] WHERE ([SearchString] = ?)">
<SelectParameters>
<asp:controlparameter ControlID="GridView1" Name="SearchString" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:AccessDataSource>
<asp:DetailsView id="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="AccessDataSource2" Height="50px" Width="442px">
<Fields>
<asp:boundfield DataField="CoID" HeaderText="Company ID" SortExpression="CoID">
</asp:boundfield>
<asp:boundfield DataField="ProjClass" HeaderText="Project Class" SortExpression="ProjClass">
</asp:boundfield>
<asp:boundfield DataField="Project" HeaderText="Project" SortExpression="Project">
</asp:boundfield>
<asp:boundfield DataField="FileName" HeaderText="File Name" SortExpression="FileName">
</asp:boundfield>
<asp:boundfield DataField="FileAddInfo" HeaderText="File Additional Info" SortExpression="FileAddInfo">
</asp:boundfield>
<asp:boundfield DataField="PeriodBegin" DataFormatString="{0:d}" HeaderText="Period Begin" SortExpression="PeriodBegin">
</asp:boundfield>
<asp:boundfield DataField="PeriodEnd" DataFormatString="{0:d}" HeaderText="Period End" SortExpression="PeriodEnd">
</asp:boundfield>
<asp:boundfield DataField="FileType" HeaderText="File Type" SortExpression="FileType">
</asp:boundfield>
<asp:boundfield DataField="FileNumber" HeaderText="File Number" SortExpression="FileNumber">
</asp:boundfield>
<asp:boundfield DataField="BoxNumber" HeaderText="Box Number" SortExpression="BoxNumber">
</asp:boundfield>
<asp:boundfield DataField="SearchString" HeaderText="Search String" ReadOnly="True" SortExpression="SearchString">
</asp:boundfield>
<asp:boundfield DataField="Location" HeaderText="Location" SortExpression="Location">
</asp:boundfield>
</Fields>
</asp:DetailsView>
</form>
</div>
</asp:Content>
<asp:Content id="Content2" runat="server" contentplaceholderid="head">
<style type="text/css">
table {
width: 820px;
}
.gridview {
width: 820px;
position: fixed;
}
</style>
</asp:Content>
View 5 Replies
Mar 11, 2011
I have a gridview control with a details column. I want the user to click details and it give me a pop-up showing details of the particular row. Any idea on how to do this using JQuery?? Looking for an example with code..
View 1 Replies
Apr 11, 2010
I have a details view that appears when record is selected in a GridView. Can this details view be opened in it's own modal window that would allow me to use the full event model?
View 3 Replies
Dec 7, 2010
I want to render something like this (with ASP.Net Controls in the codebehind):
<ul>
<li class="first"><h1>This is a caption</h1></li>
<li><a href="#" title="" target="_self">Foo</a></li>
<li><a href="#" title="" target="_self">Foo1</a></li>
<li><a href="#" title="" target="_self">Foo2</a></li>
<li><a href="#" title="" target="_self">Foo3</a></li>
<li><a href="#" title="" target="_self">Foo4</a></li>
</ul>
<ul>
<li class="first"><h1>This is a another caption</h1></li>
<li><a href="#" title="" target="_self">Foo5</a></li>
<li><a href="#" title="" target="_self">Foo6</a></li>
<li><a href="#" title="" target="_self">Foo7</a></li>
<li><a href="#" title="" target="_self">Foo8</a></li>
<li><a href="#" title="" target="_self">Foo9</a></li>
<li><a href="#" title="" target="_self">Foo10</a></li>
<li><a href="#" title="" target="_self">Foo11</a></li>
</ul>
The amount of li elements that will be rendered into each ul is determined at runtime. Each link in a li belongs to into a specific ul (the one containing a specific caption. Imagine this as a kind of a treeview with nodes and subnodes) During the bind Event I need access to an ASP:HyperLink that will be rendered into the a-element. Which databound ASP.Net control should I pick for this? Looks like a repeater in a repeater, which should make the databinding process ugly. I'm thinking about creating this HTML-Output with StringWriters myself.
View 1 Replies