473,396 Members | 2,002 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,396 software developers and data experts.

LinkButton Problem


Hello,

I am using dynamically created LinkButtons. When I run the project I get an error message saying "Line: 114, Char: 33, Error: Expected ";", Code: 0......."

The code I am using to create these LinkButtons is:

Dim obj As New LinkButton

obj.Text = "<br>" + a.Description + "<br>"

Me.ucTemplate.addHyperlinkToActivities(obj)

.............

.............

Me.Placeholder1.Controls.Add(obj)

I am also building "Labels" and "Buttons", but am not having the aforementioned error message. Any idea?

Thanks
Michael
Nov 18 '05 #1
4 1129
Hi,

Which of them is line 114?

--
Cheers!
Rajiv. R
Rajspace.Org

"Mike" <no****@hotmail.com> wrote in message news:uD**************@TK2MSFTNGP09.phx.gbl...

Hello,

I am using dynamically created LinkButtons. When I run the project I get an error message saying "Line: 114, Char: 33, Error: Expected ";", Code: 0......."

The code I am using to create these LinkButtons is:

Dim obj As New LinkButton

obj.Text = "<br>" + a.Description + "<br>"

Me.ucTemplate.addHyperlinkToActivities(obj)

............

............

Me.Placeholder1.Controls.Add(obj)

I am also building "Labels" and "Buttons", but am not having the aforementioned error message. Any idea?

Thanks
Michael
Nov 18 '05 #2

Rajiv,

By looking at the generated web site code, I found the following:

101 <form name="ucTemplate:ActivitiesForm" method="post" action="Main.aspx" id="ucTemplate_ActivitiesForm">
102 <input type="hidden" name="__EVENTTARGET" value="" />
103 <input type="hidden" name="__EVENTARGUMENT" value="" />
104 <input type="hidden" name="__VIEWSTATE" value="dDwtMTcyODI2MjY1Njs7Phc6Js6mah4QCazl6vSZtpd XScGu" />
105
106 <script language="javascript">
107 <!--
108 function __doPostBack(eventTarget, eventArgument) {
109 var theform;
110 if (window.navigator.appName.toLowerCase().indexOf("n etscape") > -1) {
111 theform = document.forms["ucTemplate:ActivitiesForm"];
112 }
113 else {
114 theform = document.ucTemplate:ActivitiesForm;
115 }
116 theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
117 theform.__EVENTARGUMENT.value = eventArgument;
118 theform.submit();
119 }
120 // -->
121 </script>

But I am not sure whether the source code is correctly generated, since I get the error message I described earlier.

Any idea?
--
Michael
"Rajiv R" <ra********************@yahoo.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi,

Which of them is line 114?

--
Cheers!
Rajiv. R
Rajspace.Org

"Mike" <no****@hotmail.com> wrote in message news:uD**************@TK2MSFTNGP09.phx.gbl...

Hello,

I am using dynamically created LinkButtons. When I run the project I get an error message saying "Line: 114, Char: 33, Error: Expected ";", Code: 0......."

The code I am using to create these LinkButtons is:

Dim obj As New LinkButton

obj.Text = "<br>" + a.Description + "<br>"

Me.ucTemplate.addHyperlinkToActivities(obj)

............

............

Me.Placeholder1.Controls.Add(obj)

I am also building "Labels" and "Buttons", but am not having the aforementioned error message. Any idea?

Thanks
Michael
Nov 18 '05 #3

Rajiv,

I looked at the source code again and apparently found the problem. Line 114 should be:

theform = document.forms["ucTemplate:ActivitiesForm"];

The problem is that this line of code is automatically generated by Visual Studio. Any idea on how I could fix the problem?

Thanks.
Mike
"Mike" <no****@hotmail.com> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl...

Rajiv,

By looking at the generated web site code, I found the following:

101 <form name="ucTemplate:ActivitiesForm" method="post" action="Main.aspx" id="ucTemplate_ActivitiesForm">
102 <input type="hidden" name="__EVENTTARGET" value="" />
103 <input type="hidden" name="__EVENTARGUMENT" value="" />
104 <input type="hidden" name="__VIEWSTATE" value="dDwtMTcyODI2MjY1Njs7Phc6Js6mah4QCazl6vSZtpd XScGu" />
105
106 <script language="javascript">
107 <!--
108 function __doPostBack(eventTarget, eventArgument) {
109 var theform;
110 if (window.navigator.appName.toLowerCase().indexOf("n etscape") > -1) {
111 theform = document.forms["ucTemplate:ActivitiesForm"];
112 }
113 else {
114 theform = document.ucTemplate:ActivitiesForm;
115 }
116 theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
117 theform.__EVENTARGUMENT.value = eventArgument;
118 theform.submit();
119 }
120 // -->
121 </script>

But I am not sure whether the source code is correctly generated, since I get the error message I described earlier.

Any idea?
--
Michael
"Rajiv R" <ra********************@yahoo.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi,

Which of them is line 114?

--
Cheers!
Rajiv. R
Rajspace.Org

"Mike" <no****@hotmail.com> wrote in message news:uD**************@TK2MSFTNGP09.phx.gbl...

Hello,

I am using dynamically created LinkButtons. When I run the project I get an error message saying "Line: 114, Char: 33, Error: Expected ";", Code: 0......."

The code I am using to create these LinkButtons is:

Dim obj As New LinkButton

obj.Text = "<br>" + a.Description + "<br>"

Me.ucTemplate.addHyperlinkToActivities(obj)

............

............

Me.Placeholder1.Controls.Add(obj)

I am also building "Labels" and "Buttons", but am not having the aforementioned error message. Any idea?

Thanks
Michael
Nov 18 '05 #4

I found the solution. I had to include all the HTML code in a <form>...</form> tag. I initially only included the part in which LinkButtons were created.

Wondering if this is correct...

Mike
"Mike" <no****@hotmail.com> wrote in message news:eA**************@TK2MSFTNGP11.phx.gbl...

Rajiv,

I looked at the source code again and apparently found the problem. Line 114 should be:

theform = document.forms["ucTemplate:ActivitiesForm"];

The problem is that this line of code is automatically generated by Visual Studio. Any idea on how I could fix the problem?

Thanks.
Mike
"Mike" <no****@hotmail.com> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl...

Rajiv,

By looking at the generated web site code, I found the following:

101 <form name="ucTemplate:ActivitiesForm" method="post" action="Main.aspx" id="ucTemplate_ActivitiesForm">
102 <input type="hidden" name="__EVENTTARGET" value="" />
103 <input type="hidden" name="__EVENTARGUMENT" value="" />
104 <input type="hidden" name="__VIEWSTATE" value="dDwtMTcyODI2MjY1Njs7Phc6Js6mah4QCazl6vSZtpd XScGu" />
105
106 <script language="javascript">
107 <!--
108 function __doPostBack(eventTarget, eventArgument) {
109 var theform;
110 if (window.navigator.appName.toLowerCase().indexOf("n etscape") > -1) {
111 theform = document.forms["ucTemplate:ActivitiesForm"];
112 }
113 else {
114 theform = document.ucTemplate:ActivitiesForm;
115 }
116 theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
117 theform.__EVENTARGUMENT.value = eventArgument;
118 theform.submit();
119 }
120 // -->
121 </script>

But I am not sure whether the source code is correctly generated, since I get the error message I described earlier.

Any idea?
--
Michael
"Rajiv R" <ra********************@yahoo.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi,

Which of them is line 114?

--
Cheers!
Rajiv. R
Rajspace.Org

"Mike" <no****@hotmail.com> wrote in message news:uD**************@TK2MSFTNGP09.phx.gbl...

Hello,

I am using dynamically created LinkButtons. When I run the project I get an error message saying "Line: 114, Char: 33, Error: Expected ";", Code: 0......."

The code I am using to create these LinkButtons is:

Dim obj As New LinkButton

obj.Text = "<br>" + a.Description + "<br>"

Me.ucTemplate.addHyperlinkToActivities(obj)

............

............

Me.Placeholder1.Controls.Add(obj)

I am also building "Labels" and "Buttons", but am not having the aforementioned error message. Any idea?

Thanks
Michael
Nov 18 '05 #5

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

Similar topics

2
by: News | last post by:
Hi, I need help with datalist and linkbutton. I need a LinkButton to display in datalist if datafield "is_measure_customchecklist" in a db table set to true. Here is the code (in parts): ...
0
by: Solomon Shaffer | last post by:
This is very interesting - and odd. I have a number of LinkButtons that are created in a custom data grid that I created. The purpose of the LinkButtons is to provide alphabetical filtering...
10
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I...
3
by: Rob Meade | last post by:
Hi all, I have a bit of code that programmatically adds some table cells/rows to a table. The last cell adds a LinkButton control, I call it like this: ...
10
by: Vi | last post by:
Hi, I'm trying to dinamically add LinkButton Controls to a web form. I do something like: for(i=1;i<=someVariable;i++) { LinkButton PageLink = new LinkButton(); PageLink.CommandName =...
7
by: Alex Maghen | last post by:
I have a DataGrid control with a LinkButton command column that deletes the row. What I want to do is set it up so that there's a client-side Confirm alert BEFORE the actual Delete command gets...
3
by: MRW | last post by:
I have a simple linkbutton and a function when it's clicked. It works perfectly in a regular .aspx page. However, when I place it inside the ContentPlaceHolder, it no longer works. It does...
2
by: WolfyUK | last post by:
Hello, I have a standard asp:DataGrid called CasesGrid that I wish to write my own paging controls for. The aim is to get something like the following rendered to screen: << First < Previous...
13
by: rn5a | last post by:
In a shopping cart app, suppose a user has placed 5 orders, I want to show him 5 LinkButtons (one for each order) so that when he clicks the first LinkButton, he would be shown the details of his...
5
by: Peter Larsen [CPH] | last post by:
Hi, The following sample shows a LinkButton in the HeaderTemplate of a Repeater control. The problem is that i'm not able to access the linkbutton in code (in the cs file) as long as the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.