The short answer to your question is yes.
Below is a snippet of one of my application pages, where we tease out the ListID and ItemID that were passed via the URL query string (more on that at Chak's Sharepoint Corner)
Note, in my example page below, I skipped using any ASPX web controls and just emit HTML directly to the response stream. You can altar to do whatever you want, of course. You'll want to implement post-backs and such so as to update a list item I assume.. my un-used 'LoadListVariables' function will at least show you how to get started.
Imports System
Imports Microsoft.SharePoint
Imports Microsoft.SharePoint.WebControls
Imports Microsoft.SharePoint.Administration
Namespace AjaxPagelets
Partial Public Class CommentsFetcher
Inherits LayoutsPageBase
Private m_siteID As Guid
Private m_webID As Guid
Private m_currentListID As Guid
Private idForList As String
Private itemidFromQS As String
Private specificListItemid As Integer
Private currentLogList As SPList
Private currentLogListItem As SPListItem
Private Sub LoadCommonVariables()
m_siteID = SPContext.Current.Site.ID
m_webID = SPContext.Current.Web.ID
idForList = Request.Params("ListID")
itemidFromQS = Request.Params("ItemID")
specificListItemid = 0
m_currentListID = New Guid(idForList)
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
LoadCommonVariables()
Dim doThis As SPSecurity.CodeToRunElevated
doThis = AddressOf LoadListVariables
SPSecurity.RunWithElevatedPrivileges(doThis)
Response.Clear()
Response.Write("<html><head><title>" & CStr(currentLogListItem("Title")) & "</title>" & vbCrLf)
Response.Write("<script type=""text/javascript"">function closeTheWindow(){window.frameElement.commonModalDialogClose(0, 0);}</script>")
Response.Write("<style>body{font-family:Trebuchet MS;}</style></head><body>" & vbCrLf)
Response.Write(currentLogListItem("Comments"))
Response.Write("<br /><a href='javascript:closeTheWindow()'>Close</a>")
Response.Write("</body></html>")
End Sub
Private Sub LoadListVariables()
If Int32.TryParse(itemidFromQS, specificListItemid) Then
Using site As New SPSite(m_siteID)
Using wb As SPWeb = site.AllWebs(m_webID)
Try
currentLogList = wb.Lists(m_currentListID)
currentLogListItem = currentLogList.GetItemById(specificListItemid)
Catch ex As Exception
SPDiagnosticsService.Local.WriteTrace(0, New SPDiagnosticsCategory("eSWRC Comments Fetch Failure", TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, ex.Message, ex.StackTrace)
EmitExceptionResponse(ex)
End Try
End Using
End Using
End If
End Sub
Private Sub EmitExceptionResponse(ByVal ex As Exception)
Response.Write("<html><head><title>There was an error!</title>" & vbCrLf)
Response.Write("<script type=""text/javascript"">function closeTheWindow(){window.frameElement.commonModalDialogClose(0, 0);}</script>")
Response.Write("<style>body{font-family:Trebuchet MS;}</style>" & vbCrLf)
Response.Write(String.Format("</head><body><h1>{0}</h1><h3>{1}</h3><a href='javascript:closeTheWindow()'>Close</a>", ex.Message, ex.StackTrace.Replace(vbCrLf, "<br />")))
Response.Write(String.Format("<h4>ListID: {0}</h4>{2}<h4>ItemID: {1}</h4>{2} <p>SiteID:{3}</p>{2}<p>WebID: {4}</p>{2}<h2>SPCurrent.ListID: {5}</h2>{2}", idForList, itemidFromQS, vbCrLf, m_siteID, m_webID, m_currentListID))
Response.Write("</body></html>")
End Sub
End Class
End Namespace
Because my application page is shown within a SharePoint modal dialog, I used a special piece of JavaScript that allows the user to close the dialog correctly, too.