开发者

calling a C# function from a link on an asp page

开发者 https://www.devze.com 2023-02-17 17:23 出处:网络
I have an asp login page. When a user clicks a link I need it to call a function in a .cs file to dynamically create the url and redirect. How would I g开发者_JS百科o about doing this?I think this is

I have an asp login page. When a user clicks a link I need it to call a function in a .cs file to dynamically create the url and redirect. How would I g开发者_JS百科o about doing this?


I think this is what you're looking for.


you need to make use of postback. Add for example Button on the page and set property AutoPostBack=true, set it's Click event handler to be a method in your cs file (code behind) and use Response.Redirect() inside that handler

0

精彩评论

暂无评论...
验证码 换一张
取 消