|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Detailsview and stored Proc<asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="SqlDataSource1" Height="1px" Width="100%"> <RowStyle Wrap="False" /> </asp:DetailsView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1 %>" SelectCommand="GETOLDSHIPRECORD" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:QueryStringParameter Name="TNUMBER" QueryStringField="tnumber" Type="String" Size="6" /> </SelectParameters> </asp:SqlDataSource> The Stored Procedure example is: Create Procedure [GETOLDSHIPRECORD] @Tnumber INT DECLARE @RETURNVAL varchar(3) as IF (@Tnumber > 400000) Begin Set @ReturnVal = "NO" End Else Begin Set @ReturnVal = "YES" End Select @ReturnVAL as [OLD ORDER] GO What is the event triggered after this stored procedure is triggered and writen to the screen. (in vb) I tried a few thing but could not get it working. Thanks Tdar DetailsVeiw.Selected event
-- Show quoteHide quote[note: if this post answers your question, you can mark it as an answer using the web-based newsreader functions] ----- HTH, Phillip Williams http://www.societopia.net http://www.webswapp.com "TdarTdar" wrote: > Using the following example: > > <asp:DetailsView ID="DetailsView1" runat="server" > DataSourceID="SqlDataSource1" Height="1px" > Width="100%"> > <RowStyle Wrap="False" /> > </asp:DetailsView> > > <asp:SqlDataSource ID="SqlDataSource1" runat="server" > ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1 %>" > SelectCommand="GETOLDSHIPRECORD" SelectCommandType="StoredProcedure"> > <SelectParameters> > <asp:QueryStringParameter Name="TNUMBER" > QueryStringField="tnumber" Type="String" Size="6" /> > </SelectParameters> > </asp:SqlDataSource> > > > The Stored Procedure example is: > > Create Procedure [GETOLDSHIPRECORD] > @Tnumber INT > DECLARE @RETURNVAL varchar(3) > as > IF (@Tnumber > 400000) > Begin > Set @ReturnVal = "NO" > End > Else > Begin > Set @ReturnVal = "YES" > End > Select @ReturnVAL as [OLD ORDER] > GO > > > > What is the event triggered after this stored procedure is triggered and > writen to the screen. (in vb) > I tried a few thing but could not get it working. > > Thanks > Tdar OOps. I meant SqlDataSource.Selected event. (The SqlDataSource object to
which the DetailsView is databound.) Show quoteHide quote "Phillip Williams" wrote: > DetailsVeiw.Selected event > -- > [note: if this post answers your question, you can mark it as an answer > using the web-based newsreader functions] > ----- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "TdarTdar" wrote: > > > Using the following example: > > > > <asp:DetailsView ID="DetailsView1" runat="server" > > DataSourceID="SqlDataSource1" Height="1px" > > Width="100%"> > > <RowStyle Wrap="False" /> > > </asp:DetailsView> > > > > <asp:SqlDataSource ID="SqlDataSource1" runat="server" > > ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1 %>" > > SelectCommand="GETOLDSHIPRECORD" SelectCommandType="StoredProcedure"> > > <SelectParameters> > > <asp:QueryStringParameter Name="TNUMBER" > > QueryStringField="tnumber" Type="String" Size="6" /> > > </SelectParameters> > > </asp:SqlDataSource> > > > > > > The Stored Procedure example is: > > > > Create Procedure [GETOLDSHIPRECORD] > > @Tnumber INT > > DECLARE @RETURNVAL varchar(3) > > as > > IF (@Tnumber > 400000) > > Begin > > Set @ReturnVal = "NO" > > End > > Else > > Begin > > Set @ReturnVal = "YES" > > End > > Select @ReturnVAL as [OLD ORDER] > > GO > > > > > > > > What is the event triggered after this stored procedure is triggered and > > writen to the screen. (in vb) > > I tried a few thing but could not get it working. > > > > Thanks > > Tdar Thanks for Phillip's suggestion.
Hi Tdar, If what you want do is perform some post-processing after the DataSource control execute the select store procedure, I think Phillip's suggestion on utilizing the DataSource's Selected event is reasonable. Also, the updated, deleted.... events are the corresponding ones for post-processing Update, Delete... operation... If there're any other particular problem on this, please feel free to post here. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | Thread-Topic: Detailsview and stored Proc <Phillip.Willi***@webswapp.com>| thread-index: AcXq+Y6emuZfv3KeS4SkNFdhw8+OgA== | X-WBNR-Posting-Host: 64.253.156.46 | From: "=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=" | References: <EE9F888C-643D-4528-A972-EACD72AED***@microsoft.com> <A648C8A1-BD35-4EC8-801D-F0CC91DA6***@microsoft.com>Show quoteHide quote | Subject: RE: Detailsview and stored Proc microsoft.public.dotnet.framework.aspnet.webcontrols:31176| Date: Wed, 16 Nov 2005 14:03:21 -0800 | Lines: 61 | Message-ID: <793F9B75-D00B-48B1-AAAC-43BD9BCB8***@microsoft.com> | MIME-Version: 1.0 | Content-Type: text/plain; | charset="Utf-8" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Content-Class: urn:content-classes:message | Importance: normal | Priority: normal | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols SelectCommandType="StoredProcedure">| | OOps. I meant SqlDataSource.Selected event. (The SqlDataSource object to | which the DetailsView is databound.) | | "Phillip Williams" wrote: | | > DetailsVeiw.Selected event | > -- | > [note: if this post answers your question, you can mark it as an answer | > using the web-based newsreader functions] | > ----- | > HTH, | > Phillip Williams | > http://www.societopia.net | > http://www.webswapp.com | > | > | > "TdarTdar" wrote: | > | > > Using the following example: | > > | > > <asp:DetailsView ID="DetailsView1" runat="server" | > > DataSourceID="SqlDataSource1" Height="1px" | > > Width="100%"> | > > <RowStyle Wrap="False" /> | > > </asp:DetailsView> | > > | > > <asp:SqlDataSource ID="SqlDataSource1" runat="server" | > > ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1 %>" | > > SelectCommand="GETOLDSHIPRECORD" Show quoteHide quote | > > <SelectParameters> | > > <asp:QueryStringParameter Name="TNUMBER" | > > QueryStringField="tnumber" Type="String" Size="6" /> | > > </SelectParameters> | > > </asp:SqlDataSource> | > > | > > | > > The Stored Procedure example is: | > > | > > Create Procedure [GETOLDSHIPRECORD] | > > @Tnumber INT | > > DECLARE @RETURNVAL varchar(3) | > > as | > > IF (@Tnumber > 400000) | > > Begin | > > Set @ReturnVal = "NO" | > > End | > > Else | > > Begin | > > Set @ReturnVal = "YES" | > > End | > > Select @ReturnVAL as [OLD ORDER] | > > GO | > > | > > | > > | > > What is the event triggered after this stored procedure is triggered and | > > writen to the screen. (in vb) | > > I tried a few thing but could not get it working. | > > | > > Thanks | > > Tdar | Hi Tdar,
Does our suggestion help you a little? If there're anything else we can help, please feel free to post here. Thanks, Steven Cheng Microsoft Online Support Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | X-Tomcat-ID: 126867111 <A648C8A1-BD35-4EC8-801D-F0CC91DA6***@microsoft.com> | References: <EE9F888C-643D-4528-A972-EACD72AED***@microsoft.com> <793F9B75-D00B-48B1-AAAC-43BD9BCB8***@microsoft.com> | MIME-Version: 1.0 microsoft.public.dotnet.framework.aspnet.webcontrols:31185| Content-Type: text/plain | Content-Transfer-Encoding: 7bit | From: stch***@online.microsoft.com (Steven Cheng[MSFT]) | Organization: Microsoft | Date: Thu, 17 Nov 2005 06:20:58 GMT | Subject: RE: Detailsview and stored Proc | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | Message-ID: <bUIwc8z6FHA.3***@TK2MSFTNGXA02.phx.gbl> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | Lines: 91 | Path: TK2MSFTNGXA02.phx.gbl | Xref: TK2MSFTNGXA02.phx.gbl Show quoteHide quote | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182 | | Thanks for Phillip's suggestion. | | Hi Tdar, | | If what you want do is perform some post-processing after the DataSource | control execute the select store procedure, I think Phillip's suggestion on | utilizing the DataSource's Selected event is reasonable. Also, the updated, | deleted.... events are the corresponding ones for post-processing Update, | Delete... operation... | | If there're any other particular problem on this, please feel free to post | here. | | Thanks, | | Steven Cheng | Microsoft Online Support | | Get Secure! www.microsoft.com/security | (This posting is provided "AS IS", with no warranties, and confers no | rights.) | -------------------- | | Thread-Topic: Detailsview and stored Proc | | thread-index: AcXq+Y6emuZfv3KeS4SkNFdhw8+OgA== | | X-WBNR-Posting-Host: 64.253.156.46 | | From: "=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=" | <Phillip.Willi***@webswapp.com> | | References: <EE9F888C-643D-4528-A972-EACD72AED***@microsoft.com> | <A648C8A1-BD35-4EC8-801D-F0CC91DA6***@microsoft.com> | | Subject: RE: Detailsview and stored Proc | | Date: Wed, 16 Nov 2005 14:03:21 -0800 | | Lines: 61 | | Message-ID: <793F9B75-D00B-48B1-AAAC-43BD9BCB8***@microsoft.com> | | MIME-Version: 1.0 | | Content-Type: text/plain; | | charset="Utf-8" | | Content-Transfer-Encoding: 7bit | | X-Newsreader: Microsoft CDO for Windows 2000 | | Content-Class: urn:content-classes:message | | Importance: normal | | Priority: normal | | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 | | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols | | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250 | | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl | | Xref: TK2MSFTNGXA02.phx.gbl | microsoft.public.dotnet.framework.aspnet.webcontrols:31176 | | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols | | | | OOps. I meant SqlDataSource.Selected event. (The SqlDataSource object | to | | which the DetailsView is databound.) | | | | "Phillip Williams" wrote: | | | | > DetailsVeiw.Selected event | | > -- | | > [note: if this post answers your question, you can mark it as an answer | | > using the web-based newsreader functions] | | > ----- | | > HTH, | | > Phillip Williams | | > http://www.societopia.net | | > http://www.webswapp.com | | > | | > | | > "TdarTdar" wrote: | | > | | > > Using the following example: | | > > | | > > <asp:DetailsView ID="DetailsView1" runat="server" | | > > DataSourceID="SqlDataSource1" Height="1px" | | > > Width="100%"> | | > > <RowStyle Wrap="False" /> | | > > </asp:DetailsView> | | > > | | > > <asp:SqlDataSource ID="SqlDataSource1" runat="server" | | > > ConnectionString="<%$ ConnectionStrings:Main_SystemConnectionString1 | %>" | | > > SelectCommand="GETOLDSHIPRECORD" | SelectCommandType="StoredProcedure"> | | > > <SelectParameters> | | > > <asp:QueryStringParameter Name="TNUMBER" | | > > QueryStringField="tnumber" Type="String" Size="6" /> | | > > </SelectParameters> | | > > </asp:SqlDataSource> | | > > | | > > | | > > The Stored Procedure example is: | | > > | | > > Create Procedure [GETOLDSHIPRECORD] | | > > @Tnumber INT | | > > DECLARE @RETURNVAL varchar(3) | | > > as | | > > IF (@Tnumber > 400000) | | > > Begin | | > > Set @ReturnVal = "NO" | | > > End | | > > Else | | > > Begin | | > > Set @ReturnVal = "YES" | | > > End | | > > Select @ReturnVAL as [OLD ORDER] | | > > GO | | > > | | > > | | > > | | > > What is the event triggered after this stored procedure is triggered | and | | > > writen to the screen. (in vb) | | > > I tried a few thing but could not get it working. | | > > | | > > Thanks | | > > Tdar | | | |
Problems with Re-Usable ASP.NET User Control Libraries
FtpWebRequest UploadFile Page_Error event issue Treeview tweak Accessing the values of textboxes/labels within a function White spaces in DropDownList / Listbox / ... How to insert a new record in detailsview when there are no record AutoEventWireUp Problem cannot access container data in templated control how to hide a root element in treeview when binding to sitemap?!? |
|||||||||||||||||||||||