473,388 Members | 1,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

2 simple questions

I have dataRepeater:

<asp:Repeater ID="repeater1" Runat="server">
<ItemTemplate>
<%# writeLine(DataBinder.Eval(Container.DataItem, "danIme"))%>
</ItemTemplate>

<FooterTemplate>
<asp:Button ID="btnDelete" Runat="server" Text="Delete"></asp:Button>
</FooterTemplate>
</asp:Repeater>

Then my function:

Protected Function writeLine(ByVal dan As String)as string

writeLine="<input onclick='" & btnDelete.ClientID & ".click()'
type='button' value='Delete'>"

....and so on

End Function

Why I can't use btnDelete.ClientID here?

I would like that when user click the button, the button btnDelete on the
client is clicked. Do you have any solution?

And second question:

If I have:

<ItemTemplate>

<asp:button runat=server id=btnTest></asp:Button>

<%# writeLine(DataBinder.Eval(Container.DataItem, "danIme"))%>

</ItemTemplate>

And my function:

Protected Function writeLine(ByVal dan As String)as string

btntest.visible=false

.....

End Function

Why I can't reference the button in my function. I always get the error
message: Not set to the instance of the object

I set the reference on the beginning of the code behind class:

Protected WithEvents btnTest As System.Web.UI.WebControls.Button

Do you know the answer,

Thank you,

S
Nov 18 '05 #1
2 1492
Hi simon,

can u try adding the javascript part to the button in the itemdatabound
event for the repeater control ?

in the itemdatabound event
retrieve the button and call btn.attributes.add();

HTH
Regards
Ashish M Bhonkiya

--
Regards
Ashish M Bhonkiya
"simon" <si*********@stud-moderna.si> wrote in message
news:uE**************@TK2MSFTNGP12.phx.gbl...
I have dataRepeater:

<asp:Repeater ID="repeater1" Runat="server">
<ItemTemplate>
<%# writeLine(DataBinder.Eval(Container.DataItem, "danIme"))%>
</ItemTemplate>

<FooterTemplate>
<asp:Button ID="btnDelete" Runat="server" Text="Delete"></asp:Button>
</FooterTemplate>
</asp:Repeater>

Then my function:

Protected Function writeLine(ByVal dan As String)as string

writeLine="<input onclick='" & btnDelete.ClientID & ".click()'
type='button' value='Delete'>"

...and so on

End Function

Why I can't use btnDelete.ClientID here?

I would like that when user click the button, the button btnDelete on the
client is clicked. Do you have any solution?

And second question:

If I have:

<ItemTemplate>

<asp:button runat=server id=btnTest></asp:Button>

<%# writeLine(DataBinder.Eval(Container.DataItem, "danIme"))%>

</ItemTemplate>

And my function:

Protected Function writeLine(ByVal dan As String)as string

btntest.visible=false

....

End Function

Why I can't reference the button in my function. I always get the error
message: Not set to the instance of the object

I set the reference on the beginning of the code behind class:

Protected WithEvents btnTest As System.Web.UI.WebControls.Button

Do you know the answer,

Thank you,

S

Nov 18 '05 #2
Thank you,

I'll try.
I think that is an answer on both questions:)

Simon

"Ashish M Bhonkiya" <bh******@hotmail.com.nospam> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi simon,

can u try adding the javascript part to the button in the itemdatabound
event for the repeater control ?

in the itemdatabound event
retrieve the button and call btn.attributes.add();

HTH
Regards
Ashish M Bhonkiya

--
Regards
Ashish M Bhonkiya
"simon" <si*********@stud-moderna.si> wrote in message
news:uE**************@TK2MSFTNGP12.phx.gbl...
I have dataRepeater:

<asp:Repeater ID="repeater1" Runat="server">
<ItemTemplate>
<%# writeLine(DataBinder.Eval(Container.DataItem, "danIme"))%>
</ItemTemplate>

<FooterTemplate>
<asp:Button ID="btnDelete" Runat="server" Text="Delete"></asp:Button> </FooterTemplate>
</asp:Repeater>

Then my function:

Protected Function writeLine(ByVal dan As String)as string

writeLine="<input onclick='" & btnDelete.ClientID & ".click()'
type='button' value='Delete'>"

...and so on

End Function

Why I can't use btnDelete.ClientID here?

I would like that when user click the button, the button btnDelete on the client is clicked. Do you have any solution?

And second question:

If I have:

<ItemTemplate>

<asp:button runat=server id=btnTest></asp:Button>

<%# writeLine(DataBinder.Eval(Container.DataItem, "danIme"))%>

</ItemTemplate>

And my function:

Protected Function writeLine(ByVal dan As String)as string

btntest.visible=false

....

End Function

Why I can't reference the button in my function. I always get the error
message: Not set to the instance of the object

I set the reference on the beginning of the code behind class:

Protected WithEvents btnTest As System.Web.UI.WebControls.Button

Do you know the answer,

Thank you,

S


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: yiyun | last post by:
Hi, I am new to mysql and I want to ask a simple questions. I would like to initialize my InnoDB table space and I configure like below: ...
18
by: Geoff Cox | last post by:
Hello, I am trying to print out the array values for a second time but get error on page message? Thanks Geoff <html>
1
by: Proteus | last post by:
Any help appreciated on a small perl project I need to write for educator/teaching purposes. I have not programmed perl for some time, need to get up to speed, maybe some kind souls hrere will help...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
1
by: E.T. Grey | last post by:
I have been busting my nut over this for pretty much most of the day and it is driving me nuts. I posted this to an mySQL ng yesterday and I have not had any response (I'm pulling my hair out...
7
by: javedna | last post by:
Hi guys Ive got a simple problem, im designing an online questionnaire and on submission the coding that I have used to validate whether a user has filled in all the questions is supposed to...
1
by: chelisek | last post by:
I have two simple questions: I am trying to create a document using an excel spreadsheet format. I am trying to create a column that will contain numbers, just plain numbers as in account numbers...
1
by: Itanium | last post by:
Hi all! I'm new to .NET Platform and got some simple questions about efficiency... To put you in situation, to say that I'm involved in the writing of a complex regex based lexer for use over...
17
by: Chris M. Thomasson | last post by:
I use the following technique in all of my C++ projects; here is the example code with error checking omitted for brevity: _________________________________________________________________ /*...
4
by: maheshgupta0248 | last post by:
Hi all, Im a newbie in php, started learning php on my own. I want to create small website using php, that contains links for two simple webpages > C questions > C++ questions C questions...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.