Jump to content

Get var in jQuery(aspx) from (aspx.cs)


kaub0st3r

Recommended Posts

tenho esta função em aspx(html)

function end(url) {

var url = getUrlVars(url);

var url2 = url["access_token"];

}

e quero no aspx.cs conseguir o valor do url2.

protected void Page_Load(object sender, EventArgs e)

{

string variableURL2 = ??????????????

}

encontrei esta solução na net mas não consigo que funcione:

aspx(html):

<asp:HiddenField Id="HiddenField1" runat="server"></asp:HiddenField>

na função:

document.getElementById("HiddenField1").value = url["access_token"];

no aspx.cs:

string variableURL2 = HiddenField1.Value;

Alguem sabe porque? O meu problema é com o token do facebook que preciso de guardar na base de dados, a minha ideia principal foi usar web forms .net, se as vezes alguem tiver soluções melhores agradeço ajuda 🙂

blogue: migalhasfrog.blogspot.comtwitter: ricardo_pt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.