开发者

Dotnetnuke - How to write server side script in skin.ascx file

开发者 https://www.devze.com 2023-01-14 04:15 出处:网络
I am extremely new to dotnetnuke. I don\'t know which server side language can write in Dotnetnuke skin.ascx page. How to write server side script in sk开发者_如何学运维in.ascx file?just use <% %&g

I am extremely new to dotnetnuke. I don't know which server side language can write in Dotnetnuke skin.ascx page. How to write server side script in sk开发者_如何学运维in.ascx file?


just use <% %> same as normal .aspx./ascx page, for example:


<%
DotNetNuke.Framework.jQuery.RequestRegistration()
%>

just use the syntax of vb or c# whatever you are using


Or alternatively use this. Also works with VB or C#

  <script runat="server">
  Protected Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

  'do something'

  End Sub
  </script>


You can also create a skin object which is similar to a user control see the link below for a simple example that adds hello to the login users name

http://www.datasprings.com/Resources/ArticlesInformation/DevelopingandImplementingDNNSkinObjects.aspx

0

精彩评论

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