473,769 Members | 7,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a seperate Edit page

I am using Visual Web Developer to create a basic database app. I put
in a grid view and Enabled Selecting on the gridview. What I would like
to happen though is when the person clicks select it opens up a
different EditItems.aspx page with the edit template so the user can
edit the exact item they have selected. I have seen how to do it on one
page but I would really like to keep the Edit Template on a seperate
page.

Jan 26 '06 #1
5 1296
I had a similar problem once. What I did was create a hyperlink to another
..aspx page which was my custom edit form. I rendered the hyperlink with a
unique ID to my database item (ie http://myserver/mypage.aspx?ID=123). I
made this page pop up in a modal window and it works pretty slick. This way
you have complete control over the editing of the item. One drawback is that
the edit page needs to make another trip to the database to get information
about the item based on its ID so it can display itself to the user. Hope
that helps,

Regards,

- Chase

"MasterChie f" wrote:
I am using Visual Web Developer to create a basic database app. I put
in a grid view and Enabled Selecting on the gridview. What I would like
to happen though is when the person clicks select it opens up a
different EditItems.aspx page with the edit template so the user can
edit the exact item they have selected. I have seen how to do it on one
page but I would really like to keep the Edit Template on a seperate
page.

Jan 27 '06 #2
Thanks for the response. I do have a unique ID for each record. I am
having problems linking though. I could do it fine in ASP but can't
figure it out really in .NET. I chaged the Select button to a template
and made a postback to the edit page. Now in the .aspx code I feel like
I should be adding something but I can't figure out what. What I
thought it might look like is
PostBackUrl="~/EditItem.aspx<% eval('plan_id') %>"

but that doesn't work. Any help would be appreciated.

Jan 27 '06 #3
What you are doing looks very familiar, I think I tried that and failed but
never really understood why. What I ended up doing was writing my own
function to return the entire url. Here is my working code:
<ItemTemplate >
<asp:HyperLin k Runat=server NavigateUrl='<% #
GetTicketDetail sUrl((int)DataB inder.Eval(Cont ainer.DataItem, "OutageID") ) %>'
ID="HyperlinkTi cketNumber" CssClass="Ticke tNumber"><%#
DataBinder.Eval (Container.Data Item, "TicketNumb er") %>
</asp:HyperLink>
</ItemTemplate>

OutageID is the title of the column in my DataSet that contains the unique
ID of my entry.

and then in my code behind I have the GetTicketDetail sUrl function:
protected string GetTicketDetail sUrl(int outageID)
{
return "javascript:mWi n('" + webServerRootUr l + "Details.aspx?I D=" +
outageID.ToStri ng() + "', null,
'height=500,wid th=500,top=100, status=yes,tool bar=no,menubar= no,location=no, resizable=yes,s crollbars=yes') ";
}

I use javascript in the url because when they click on the link they get a
pop-up type window, but you could easily modify it so that it returns your
url:
return "~/EditItem.aspx?I D=" + outageID.toStri ng();

Hope that helps,

- Chase

"MasterChie f" wrote:
Thanks for the response. I do have a unique ID for each record. I am
having problems linking though. I could do it fine in ASP but can't
figure it out really in .NET. I chaged the Select button to a template
and made a postback to the edit page. Now in the .aspx code I feel like
I should be adding something but I can't figure out what. What I
thought it might look like is
PostBackUrl="~/EditItem.aspx<% eval('plan_id') %>"

but that doesn't work. Any help would be appreciated.

Jan 27 '06 #4
This part works perfectly thank you. My only question is how to did you
get it so on the EditItem page it would retrieve the outage id that was
passed a long and do the sql query from that to get an edit page with
the correct information??

Jan 30 '06 #5
I found out where I was suppose to do it. Thank you for the help.

Jan 30 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
2468
by: Sharon | last post by:
I wish to build a framework for our developers that will include a singleton pattern. But it can not be a base class because it has a private constructor and therefore can be inherit. I thought maybe a Template can be use for that, but C# does not support Templates (will be C# generics in mid 2005). Does anyone have a solution on how the singleton pattern can be written, in C#, as a framework/ infrastructure class, so users can use this...
6
1669
by: Don Wash | last post by:
Hi All! I'm developing ASP.NET pages using VB.NET language. My background is VB6 and ASP3. Right now, I'm evaluating strategies on creating reusable and common functions and methods for ASP.NET. In ASP 3, it was nothing more than functions and methods coded in #Include Files. Now ASP.NET offers features such as Page Inheritance and full software development support. So I'm just wondering, what should I do if I have 5 functions, that...
3
1270
by: David Lozzi | last post by:
OK, here's what I want to do. Display a list of items in a datagrid, which works great! When a user clicks on one of the items, they are sent to another page to view its details. Now here is where I am having an issue. I would like to display the data like so General Info EDIT Item Name: this and that Desc2: woo hoo Price: $3 Detailed Info EDIT Height: 3 Width: 2 Weight: 5
3
1404
by: ree32 | last post by:
I am creating a page with the usual feature to access a DB and edit. I have the common delete command in the datalist. But I need to create a prompt to display and ask the user again if they really want to delete this record. But I am a bit puzzled as to how to go about this when you are dealing with a datalist delete command. As I don't want to lose the details, of the selected to be deleted item on page reload. Would I need to use...
0
876
by: Mahesh D. Rane | last post by:
Hi, I am creating 20+ dll's of one single web application. means for each folder inside the web application i am creating seperate dll's using a command prompt.( i am nnot using IDE) so please reply...whether this option is feasible or not ?...what would be performance issue...memory usage.... caching et cetc... Thanx.
4
1364
by: Net Developer | last post by:
I need to create a wizard like interface where a person picks an item on the first page, then goes to the next page, makes a choice there, .... Ideally it will need to be user object because of other stuff going on the page. I'm looking for suggestions on how to do this. Should each 'page' be a seperate user object or can I somehow bundle them all on the same page and make things visible/invisible. Any suggestions would be appreciated.
5
2121
by: outstretchedarm | last post by:
I'm extremely new to javascript and to programming in general. I am trying to create an interactive table. I have already created the table with constants, in the key of C (it is for music). what I would like to do is to create a dropdown box that would enable the user to select all 12 keys, then based on that choice, have the whole table re-calculate, basically transposing all the data up or down. how would I go about doing this.
4
5468
by: VB Programmer | last post by:
My client wants to be able to have unlimited pages in his website and I'm making an "admin interface" for him to add and remove pages. (He will use Macromedia Contribute to modify the content of these new pages.) I would use straight HTML pages, but I need to use the "Master Page" for the aesthetics of the pages. I need the webapp to "recognize" these new aspx pages (or that an aspx page has been deleted.) Is it possible to...
1
3753
by: skyson2ye | last post by:
Hi, guys: I have written a piece of code which utilizes Javascript in PHP to create a three level dynamic list box(Country, States/Province, Market). However, I have encountered a strange problem, and I have spent three days trying to debug but to no avail. Everything is OK when there are only two dependent list boxes, but when adding the third child list box, a problem appears: if I populate the third box only with the value: new...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9997
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.