On page_load I am filling a listbox by looping through a dataset, LISTBOX1.ITEMS.ADD(NEW ...) THe listbox fills up ok.
On a button click I'm looping through it and checking which rows have been highlighted using IF LISTBOX1.ITEMS(I).SELECTED=TRUE
...END IF. It is always evaluating to false no...
Hello,
DropDownList2's item values are assigned on the client side with javascript. THis is so they can depend on the item values of DropDownList1 without involving the server. WHen a button is clicked to submit the form, a query is run in the code behind using values from DropDownList2 and I...
...Dim connection1 As SqlConnection = New SqlConnection()
connection1.Open()
Dim q As String = "select * from dems where demid=" & x.ToString()
Response.Write(q) ' ALWAYS HAS WHERE DEMID=0 HERE
Dim command1 As SqlCommand = New SqlCommand(q, connection1)
Dim reader1 As SqlDataReader =...
Just saw your post today. Gridview does not take templatecolumn so I hope templatefield is ok.
Queried for 1 record displayed in grid2, found it, bound it to grid3 with the ascx in it. Am seeing ascx file! It has 1 textbox and 1 button.
Hoping that ascx files can eventually act like input...
On page_init, the panel populates fine, but too soon.
I need to populate it when a buttonfield on a gridview is clicked. Which ascx goes in the panel depends on a dropdownlist value.
That seems to work except when a button is clicked in an ascx populating a panel, the whole panel goes away. I...
...is clicked?
This is what is in test1.ascx so far :
got here 1
<script language="vb" runat="server">
sub a(sender as object,e as eventargs)
response.write("*")
end sub
</script>
<input name="Text1" type="text" />
<asp:Button runat="server" Text="Button" id="Button1" onclick="a"/>
Thanks for writing-no luck though. Keep seeing the control3 is not declared error
This is what I have in the aspx file now:
::::::
Towards the top are these
::::::
<%@ Register TagPrefix="prefix1" TagName="name1" Src="test1.ascx" %>
<%@ Register TagPrefix="prefix2" TagName="name2"...
Thank you for writing back Tperri. The problem seems gone now-the ascx is loading with no error and the asp:button is running simple vb functions when clicked.
I have form tags in a master page. In some place holders I have aspx files which have textboxes, dropdowns, and buttons and everything works-like they inherit the form tags from the master page.
In ascx files, buttons do not seem to inherit the master page form tags-I get an error saying the...
Thank you jbenson001 and jmeckly.
My previous reply was sent before I saw what jmeckly said.
I am still getting an error saying 'content3'is not declared. This is the code.
------------------------------------------------------
sub page_load
dim name1 = Page.LoadControl("~/name1 .ascx")...
Tried this in a sub page_load:
dim testplace3 = LoadControl("test1.ascx")
content3.controls.add(testplace3)
but got the error that content3 was not declared.
This is what I am trying to put the user controls in.
<asp:content id="Content3" contentplaceholderid="place3"...
I am trying to put user controls in a placeholder when a buttonfield column in a gridview is clicked and runs a command. Right now, I am doing this.
<asp:content id="Content3" contentplaceholderid="place3" runat="server">
<% if dropdownlist1.selecteditem.value="tbldem" then %>...
Trying to fill Detailsview1 based on the column idmain in Gridview1. The tables involved both have a field called demid (same as alias idmain) which is an integer value uniquely identifying each record in a demographic table. Other records in different tables associated with a particular...
...</asp:content>
--------------------
BELOW IS MIDDLE.ASPX
--------------------
<%@ page language="VB" masterpagefile="~/try1.master" %>
<asp:content id="Content3" contentplaceholderid="NEXTPLACE" runat="server">
***got here***
</asp:content>
SORRY IF THIS WAS HARD TO READ. THANK YOU VERY MUCH.
...ddl1.databind()
connection1.close()
end sub
sub show(sender as object,e as eventargs)
l1.text="*"&left(ddl1.selecteditem.text,instr(ddl1.selecteditem.text,chr(32)))&"*"
end sub
</script>
</head>
<body>
<form runat="server">...
...<cfprocparam cfsqltype="cf_sql_numeric" type="out" variable="stateid">
</cfstoredproc>
<cfoutput>
new*#stateid#*
</cfoutput>
</cfif>
</body>
</html>
--------this is the stored procedure try1 in try1.sql
SET ANSI_NULLS ON
GO
SET...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.