OK I was confused with items and controls.
So the item has been created meaning the row so you should be able to access any control on the row in the ItemCreated event.
How can I test for a certain control within a repeater footer to change one of its attributes? here is what I tryed and it didn't work:
protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Footer)
{
if...
OK I figured this out.
I moved the delete/minus button inside of the repeater's footer template then I was able to specify a CommandName and access it through Repeater1_ItemCommand method.
thanks for your reply!
how do I do this when my delete button is outside of the repeater?
I want them to be able to select an item and then press the delete button. If i put CommandName="delete" will the repeater still trap this if the button is outside the repeater like so? ([item1][item2]...)...
I'm having a hard time creating the logic for a SqlDataSource binded to a Repeater.
In the other controls this is all done automatically but I need to use the Repeater for formatting purposes.
I have a repeater binded to a table, then a delete button, add textbox and an add button like so...
ok I put this in prerender event instead and it works:
protected void Repeater1_PreRender(object sender, EventArgs e)
{
Button lb = (Button)Repeater1.Items[0].FindControl("ListButton");
lb.ForeColor = System.Drawing.Color.White;
lb.BackColor =...
I want to set forecolor and backcolor of the first button in a repeater control everytime the page loads.
This is what I try
protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==...
Please take a look at this once again...
Now I am back to my original question.
I know how to set the parameters and have tested this and it works.
In my button code I can insert a static value into my table like this:
protected void Button1_Click(object sender, EventArgs e)
{...
OK thanks for your help so far. I think I am finally learning how things are done but I still have much to learn.
I haven't written any code to do the insert I have only set the Insert Query property of the DataList to
INSERT INTO Items(ItemName) VALUES (@ItemName)
so as I understand when...
OK grand!
I understand this part now, thanks.
Now I have an insert query tied to SqlDataSource1 as such:
INSERT INTO Items(ItemName) VALUES (@ItemName)
so after 'Do other stuff here for your SqlDataSource I have
SqlDataSource1.InsertParameters.Add("ItemName", tb.Text);
I run the page and...
The DataList is bound but the textbox at the bottom is not bound to anything. Maybe this is my problem? Basically it looks like this:
ITEMS
-----
apples
bananas
oranges
etc..
-----
Add new item <textbox here> <add button here>
table name is Items and there are only 2 fields ItemID and ItemName...
I am not accessing the footer anywhere yet.
I am trying to set the insert paramter "@ItemName" to TextBox1.Text which is in the datalist's footer template
I tryed this in my page load but also doesn't work:
protected void Page_Load(object sender, EventArgs e)
{...
Hopefully this is an easy one!
I have a datalist bound to the table "items" which just lists the items.
In the footer template of the datalist I have "New Item" then a textbox and then an "add" button.
I simply want to take the text from the textbox and insert it into the table "items" thus...
also tryed ^<title>
and it doesn't find the title tag line
nore does this work
^.title.
I'm wondering if this is my dreamweaver or is this a global program issue
or maybe i'm not interpreting what the ^ should be doing?
or not using the right character (shift-6) ???
VFP6.0
I need to make a wizard-like program...
There are several steps that need to be completed in order.
Steps cannot be skipped!
First I tryed to fit everything on one form.
Everything wouldn't fit! Plus there are some steps that need to be done before others so it was a mess.
Next I tryed...
hey guys.. a little glitch in VFP6.0
make a simple form with a pageframe (2 or more tabs)
then change the properties to show "no tabs"
compile and run... if you click above the top border (where the tabs would normally be) you can still change to different pages!? Why is this? Is this...
This is a case of jealousy!
my best friend upgraded to xp pro
he has
tyan motherboard
1ghz processor
128 sdram
ati radeon
sb live 5.1
and it works fine on his system
I want to upgrade as well.. after playing with xp on his
machine it looks/feels alot better and worthy of the
upgrade but my...
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.