How do I set ListView data through the codebehind instead of using the Bind() function in the Text attribute?Right now I'm doing the following, but I'd like to have it retrieved and set in the codebehind. I'm using VB..
I am having trouble accessing a Javascript function from my code behind file. I need to do this as I am using the GoogleMaps JS API to add markers to a map based on addresses retrieved from my database. I have a function called AddMarker that takes in the address as a parameter, so I need to be able to call that from my code behind file in the page_load function.To simplify the question, how I can I call this javascript function to display an alert with a string passed from my code behind file?:
I have a page of checkboxes, I select a few of them, click submit, and go to a second page. on this page, I have a listview that is built using the checkboxes selected on the previous page. Now I'm wondering how i can add sortability to this listview.
In the past I would add CommandName='sort' CommandArgument='column' to the link on the header in the LayoutTemplate. But since my listview has it's header row outside of the listview, this doesn't seem to work. This is what I have so far:
<!-- header row (outside of listview, when I try to put it as a LayoutTemplate in listview i get an error, see below) --> <table>
[Code]....
I've tried to add a templatelayout in the listview, but that gives me an error on the line that binds the data (listview.databind() ), i'm assuming because this isn't possible.
I have two radio button on my asp.net page, with AutoPostBack = True When I click on either of those, they each set a flag SaveData=False However, when I click on them, the page_load event occurs first, so the page_load event saves the data, then the radiobutton_OnCheckedChanged event is triggered. How can I trigger the OnCheckedChanged before the page_load event?
for opening a popup containing package details.and in its selection in popup packageid is stored into a hiddenfield and packagename is stored into textbox. I need to clear the hidden field and textbox after selection, if I do not need it. I use "this.blur();" for not editing the text box. I need these things to be write in vb code,means in onClick I want to clear textbox, hiddenfield and then call popup.
iIhave value in hdnField in form1.aspx . I assign a value to hdnfield in javascript .I want to get that value in aspx.vb in another form, form2.aspx. How can I accomplish this?
I have a javascript function that moves items between 2 select multiple box, when I move item from the source select box to the destination select box, I add the value to my HiddenField so that I can access in code behind, works fine but when I move item(s) from the destination select box back to the source select box, I try to use : hidMemType.value = ""; to clear the hiddenfield. I thought this works but apparently in the event of a postback, the item still gets stuck in the destination box.
// Move items to and fro select box function move(sourceFrom, sourceTo) { var hidOutlet = document.getElementById('<%=hdnOutlet.ClientID%>');
I have 2 DataLists where one is nested in the other one. I have one line (Dim QID....) that keeps giving me problems, no matter what combination of code I can find online. I just want to be able to get the Hidden Field to show up as an integer so that my If statement will work.
Dim dl2 As DataList = CType(e.Item.FindControl("DataList2"), DataList) Dim QID As Integer = Convert.ToInt32(e.Item.FindControl("HiddenField2")) If QID = 33 Then
I have Listview which databound to Dataset with about 20 items per row. I have a function which executes on each ItemTemplate appearance and gets about 10 params from Eval("something"). So basically one function builds and image from 10 parameters.Instead of passing 10 Eval("something") to the function is it possible to pass it whole row and how to use this row inside of function because it is not simple DataRow or ListView row which i can access as array of items (datacolumns).Reason i do that because function looks ugly and each time i need to change it i need to deal with dozens of items.
VB.Net Public Sub LoadXML(ByVal file As String, ByVal ListViewName As ListView) Dim XMLfile As New XmlTextReader(file)
[Code].....
However, no errors are shown, the items are not added to the ListView. Also, if i check the values of "artist", it is populated, as are the rest. It just, for some reason, does not add to a listview on another form.
I know it's possible to read from database and generate them onto listbox but how about listview using call function. here's a sample of what how a listbox is able to read from a database and generate them on the listbox.the listbox is reading from database, how does one make it to read from an active listview.
Private Sub frmReceipt_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= luggageb.mdb"
We currently have a asp.net website with some modules developed in VB.Net & some in C# (not just classes but also individual aspx pages and code behind). We figur
I have the following code in my codebehind Page_Load function that sets the default selected value of a dropdownlist in detailsview based on the name of a record returned from a sql data query.Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
I'd like to impersonate a specific user in code to perform some file manipulation on a remote machine. The problem I'm having is that I am unable to get impersonation to work. I'm using the code from the Microsoft article found here: How to implement impersonation in an ASP.NET application
I'd like direction on how/where to start the debugging process. Here are my files:
Test.aspx: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="TraceFile_Test" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[Code]....
I replaced real credentials with myUserName, myDomain, and myPassword for the post.
The web server is a Windows 2008 server running IIS 7. I'm not a server guy, so I don't know where to being the troubleshooting process. Is the issue with the code or server side?
Why can I not access to the storyboard when using WPF. In Silverlight, the exact same code works.
Codebehind VB Public Class UserControl1 Private Sub UserControl1_MouseLeftButtonDown(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs) Handles Me.MouseLeftButtonDown