Dear all,
I have the following item on my form :
<asp:HyperLin k id="lblEvtNb" runat="server"
NavigateUrl="Ev ent.aspx?id=">C lick here</asp:HyperLink>
I need to pass as url parameter an Id which is a label.Text string of my form
At the end the url should be : "Event.aspx?Id= 32"
I try to do the following:
<asp:HyperLin k id="lblEvtNb" runat="server"
NavigateUrl='<% #"Event.aspx?id =" & lblReelId.Text %>'>Click
here</asp:HyperLink>
When running my code, no hyperlink is created, what I am doing wrong ?
I have try also to access the parameter through a property, but same results
Thnaks for your help
regards
serge 2 1229
the binding syntax %# is use specifically when databinding specific controls
(checkboxlist, dropdownlist, repeater, datalist, datagrid, ...) via the
DataBind() method.
From the sound of it, you simply want to dynamically set the property of a
control. I assume you want this to happen after a some type of postback - I
mean, initially, there won't be a value inthe textbox
if Page.IsPostBack then
lblEvtNb.Naviga teUrl = string.Format(" Event.aspx?id={ 0}",
lblReelId.Text" )
end if
Karl
-- http://www.openmymind.net/
"serge calderara" <se************ @discussions.mi crosoft.com> wrote in
message news:FA******** *************** ***********@mic rosoft.com... Dear all,
I have the following item on my form :
<asp:HyperLin k id="lblEvtNb" runat="server" NavigateUrl="Ev ent.aspx?id=">C lick here</asp:HyperLink>
I need to pass as url parameter an Id which is a label.Text string of my form At the end the url should be : "Event.aspx?Id= 32"
I try to do the following: <asp:HyperLin k id="lblEvtNb" runat="server" NavigateUrl='<% #"Event.aspx?id =" & lblReelId.Text %>'>Click here</asp:HyperLink>
When running my code, no hyperlink is created, what I am doing wrong ? I have try also to access the parameter through a property, but same results
Thnaks for your help regards serge
you probably never called the databind method of the control.
-- bruce (sqlwork.com)
"serge calderara" <se************ @discussions.mi crosoft.com> wrote in
message news:FA******** *************** ***********@mic rosoft.com... Dear all,
I have the following item on my form :
<asp:HyperLin k id="lblEvtNb" runat="server" NavigateUrl="Ev ent.aspx?id=">C lick here</asp:HyperLink>
I need to pass as url parameter an Id which is a label.Text string of my form At the end the url should be : "Event.aspx?Id= 32"
I try to do the following: <asp:HyperLin k id="lblEvtNb" runat="server" NavigateUrl='<% #"Event.aspx?id =" & lblReelId.Text %>'>Click here</asp:HyperLink>
When running my code, no hyperlink is created, what I am doing wrong ? I have try also to access the parameter through a property, but same results
Thnaks for your help regards serge This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Vinay |
last post by:
Hello
My question is regarding "weak external symbols". Consider the
following eg.
class test
{
public :
int func1(void); {cout <<"func1";}
int func2(void);
|
by: JD Kronicz |
last post by:
Hi .. I have an issue I have been beating my head against
the wall on for some time. I am trying to use late
binding for MS graph so that my end users don't have to
worry about having the right version of the MS Graph type
library. Up until now I have been walking them through
the process of setting the references to include their
version of MS Graph library.
My problem is that I can not seem to get the syntax
correct .. or perhaps...
|
by: JV |
last post by:
I just converted a big web project from VB.NET to C# and I got some very
strange runtime errors. Apparently, throughout the ASPX pages, the VB
version of this project used the expression <%#
Container.DataItem("columnName") %> inside an <ItemTemplate> tag for
DataGrid. Apparently though this works fine in VB.NET, for some reason C#
chokes on it. I have found that replacing those expressions with <%#
DataBinder.Eval(Container.DataItem,...
|
by: Daniel |
last post by:
I'm new to .Net and all of its abilities so I hope this makes sense.
Basically I'm confused on when is the appropriate time to use web forms
controls vs. regular HTML.
For example in ASP (non-.Net) if I wanted to fill a list it may look
something like this:
-------START CODE
<%
|
by: Gastin |
last post by:
I am consuming a web serivce from Amazon.Com. I have the following
class which was autogenerated by VS.NET when I created a Web Reference
to http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl
AmazonWebService.com.amazon.webservices.Item
As you can see from the code snippets below it has public member
variables rather than public Properties. When I use <%#
DataBinder.Eval(Container.DataItem, "ASIN") %> syntax in...
| |
by: Scott Mueller |
last post by:
I have a question about simple binding:
(please forgive any syntax errors... I am at home, where I do not have
Vb.Net installed, and I rely far too much on Vb's intellisense!)
If I have two textboxes, Textbox1 and Textbox2, and add a databinding to
Textbox2 as such:
Textbox2.Databindings.Add("Text",Textbox1,"Text")
Anything typed into Textbox1 is mirrored in Textbox2.
|
by: Steven Smith |
last post by:
Hi guy's
whats the syntax for binding the text property of a
textbox to a particular field in a dataview
programatically ?
here's the scenario my form has two main sections the
first is a datagrid the second is a series of textboxes
which are initailly bound to the same full dataset and
later depending on actions taken by the user are bound to
|
by: TS |
last post by:
when binding to a datagrid for example, is it possible to use databinding
syntax to bind to a property of a property? Say the datasource="Cars" which
is a collection of car classes and the DataValueField = "Driver.Name" which
is the Car.Driver property and then the Driver.Name property.
thanks
|
by: mdh |
last post by:
>From p112 ( K&R).
Given an array declared as
static char arr= { { 0,1,........},{0,1,.....}};
let arr be passed as an argument to f.
f( int (*arr) ) {....}
It is noted that the parentheses are necessary else it would be
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |