Basically I've got an update query that runs when you click a submit button.
I have an asp:Repeater
in my page with a layer inside like this
<asp:Repeater id="dgBookings" runat="server" OnItemDataBound="ItemDB">
<itemtemplate>
<div class="bookingscontent">
<div class="bookingdetails" id="<%# DataBinder.Eval(Container.DataItem, "booking_ref") %>">
<p class="infotext"><%# DataBinder.Eval(Container.DataItem, "adults") %> <asp:LinkButton OnClick="EditDetails" Text="Edit..." runat="server"></asp:LinkButton></p>
<p class="infotext"><asp:LinkButton OnClick="SubmitDetails" Text="Submit..." runat="server"></asp:LinkButton></p>
</div>
</div>
</itemtemplate>
<asp:Repeater>
And it outputs HTML like this
<div class="bookingscontent">
<div class="bookingdetails" id="AL05720">
<p class="infotext">2</p>
<p class="infotext"> <a href="javascript:__doPostBack('dgBookings$ctl00$ctl08','')">Submit...</a></span> <a class="EditAdults" href="#" onclick="return false">Edit...</a></p>
</div>
</div>
<div class="bookingscontent">
<div class="bookingdetails" id="BD45670">
<p class="infotext">4</p>
<p class="infotext"> <a href="javascript:__doPostBack('dgBookings$ctl00$ctl08','')">Submit...</a></span> <a class="EditAdults" href="#" onclick="return false">Edit...</a></p>
</div>
</div>
Basically I need to get the ID of the div where the person has clicked submit and I can't figure out how.
I want to put that ID into a string or a session so it can be used in SubmitDetails
Sub
Any ideas
Thanks
Jamie
UPDATE
Here's is my Sub command how would I add the command name/command arguement into this?
Sub SubmitDetails(ByVal Sender as Object, ByVal e as EventArgs)
Dim strPassedText = CommandArgument
Dim LogData2 As sterm.markdata = New sterm.markdata()
Dim queryUpdate as String = ("UPDATE OPENQUERY (dev,'SELECT * FROM web_data WHERE booking_ref = ''"+ strPassedText +"'' ') SET children = '1' ")
Dim drSetUpdate As DataSet = LogData2.StermQ2(queryUpdate)
Session("BookRefID") = strPassedText
LoadData()
End Sub
Thanks for the help so far
Jamie