sharepoint how to add code handler for button click -


i have sharepoint publishing page. added server button via spd, assign onclick handler btnsubscribe_click. question is, how , can add codes handler? if have inside dll, how can relate sharepoint page .cs file?

you cannot add controls publishing pages spd, assume mean have added button page layout? or master page?

to make onclick work, know, need have code behind, or script in code.

1) make code behind work, need make custom page layout class, extend microsoft.sharepoint.publishing.publishinglayoutpage

then change page layout declaration use new page layout code:

<%@ page language="c#" inherits="microsoft.sharepoint.publishing.publishinglayoutpage,microsoft.sharepoint.publishing,version=12.0.0.0,culture=neutral,publickeytoken=71e9bce111e9429c" %> 

2) or can enable inline script through web.config, , have standard <script runat=server> sections

3) or better yet, write web part or control subscribe action. , add page layout.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -