.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Need Help on PostBackUrl

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net

I have a page to write data into a Table, after pressing a pushbutton. This is working good!

Now I want to postback the Unique Value/Identity (It's the 'C_IDConsultaClientes' variable in the table) of this record to another page (Page2) and get that value in Page2. Could you help me do this?

The code I have is this:

   Protected Sub Bt_GravaDados_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Bt_GravaDados.Click

        Dim connString As String = System.Configuration.ConfigurationManager.ConnectionStrings("ListagemClientes").ConnectionString
        Dim cmd As Data.SqlClient.SqlCommand = Nothing
        Dim context As HttpContext = HttpContext.Current

        Using conn = New Data.SqlClient.SqlConnection(connString)

            cmd = New Data.SqlClient.SqlCommand("INSERT INTO C_ConsultasClientes (C_IDCliente, C_IDContacto, C_TituloConsulta, C_DtRecepcaoConsulta, C_MeioComunicacaoConsulta, C_CaminhoRespostaConsulta, C_RefConsultaCliente, C_RefLoop, C_FicheiroConsulta, C_ValidadeConsulta, C_ConsultaCriadaPorLoop, C_DtCriacaoConsultaLoop, C_ResponsavelLoop) VALUES (@C_IDCliente, @C_IDContacto, @C_TituloConsulta, @C_DtRecepcaoConsulta, @C_MeioComunicacaoConsulta, @C_CaminhoRespostaConsulta, @C_RefConsultaCliente, @C_RefLoo

View Complete Post

More Related Resource Links

Can I do something like that in LinkButton: PostBackUrl="MyPage.aspx&id=" + '<%# Eval("Id") %>' ?


Can I add this two things and How or it may not possible?

asp:LinkButton ID="LinkButton1"

Dynamically building linkbuttons to update a panel ~ PostBackURL's


I have a pretty simple C # page that when the page first loads, a bio is diplayed in that center section based upon sql executed from my code behind.  I have 4 link buttons on the page that when clicked, fill that center section with other content based upon which link button they clicked (News, Publications, Contact Info, and Presentations).     I was all done, then I thought about using an UpdatePanel to get rid of the annoying "flicker" when the page posts back on the click of the link button. 

So, I added an update panel, and  the necessary triggers on the 4 link buttons, since they are outside of the UpdatePanel.   But, I'm stumped on what to do with the link buttons in the codebehind.  In my current code behind, I set the PostBackURL's programatically (see below), but if I want to use an update panel, should I still be building the Postback URL's?? 

lbPublications.PostBackUrl = "~/Person.aspx?PersonID=" + Request.QueryString[

Is setting the PostBackUrl to an HTTPS url on an HTTP page secure?


Just wanted to know your thoughts on this : is it secure to POST from an HTTP page to and HTTPS page? Basically, my login box will be on an unsecured page and when the user logs in, he is sent to an HTTPS page where the FormsAuthenticationTicket is set and the user re-redirected to his original page.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend