Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
how to invoke javascript function in a asp listview button
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Guido Lindner
11y
2.4k
1
Reply
Hi, I am very new to asp and I use a asp:listview control to list the providers a user can use to log into my website using buttons:
<asp:ListView runat="server" ID="providerDetails" ItemType="Microsoft.AspNet.Membership.OpenAuth.ProviderDetails"
SelectMethod="GetProviderNames" ViewStateMode="Disabled">
<ItemTemplate>
<button runat="server" type="submit" name="provider" value="<%#: Item.ProviderName %>"
title="Log in using your <%#: Item.ProviderDisplayName %> account.">
<%#: Item.ProviderDisplayName %>
</button>
</ItemTemplate>
<EmptyDataTemplate>
<div class="message-info">
<p>There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=252803">this article</a> for details on setting up this ASP.NET application to support logging in via external services.</p>
</div>
</EmptyDataTemplate>
</asp:ListView>
Here is an example of the javascript:
<script type="text/javascript">
function login() {}
</script>
This is probably a dumb question but how would I call the javascript function when one of the listview buttons are clicked?
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Rating
scan barcode and set it into textbox using asp.net using c#