Hello,
I am trying to call a function (c#) from the repeater tool and I am not sure
if I am calling the function correctly (since I am not getting the results
that I want).
Using
<asp:Literal id="ltrNewLine " text='<%# vbBlankRowMenu( "strMenuTyp e") %>'
runat="server" />
should send the value "Title" or "Link" to the function and it should return
the string to create an empty cell.
When I added the "Eval" part, I got the error:
text='<%# vbBlankRowMenu( Eval("strMenuTy pe")) %>'
The best overloaded method match for 'mpColumn0302.v bBlankRowMenu(s tring)'
has some invalid arguments
C:\Inetpub\wwwr oot\gsttcsharp\ template\mpColu mn0302.master
Any help with this would be appreciated.
Thanks, sck10
<!-- Repeater: Menu Structure -->
<asp:Repeater id="rptMenu" runat="server">
<HeaderTemplate >
<table border="0px" style="width:99 %">
</HeaderTemplate>
<ItemTemplate >
<asp:Literal id="ltrNewLine " text='<%# vbBlankRowMenu( "strMenuTyp e")
%>' runat="server" />
<tr>
<td style="width:10 0%; text-align:left;"><% #Eval("strTarge t")%></td>
</tr>
</ItemTemplate>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:Repeater><b r />
c# class
---------------------------------------------
public string strCategory = "NoParamete r";
public string vbBlankRowMenu( string strRepeaterValu e)
{
if (strRepeaterVal ue == "Title" && strCategory != "NoParamete r")
{
strCategory = "Insert Line next time";
return "<tr><td width=600 colspan=3>  ;</div></td></tr>";
}
else
{
strCategory = "Insert Line next time";
return null;
} // end if
} 4 3481
your argument has to be an "object"
public string vbBlankRowMenu( object o)
{
string x = Convert.ToStrin g(o);
}
PS
FYI, strRepeaterValu e is hungarian notation, which isn't the preferred
notation anymore.
"sck10" <sc***@online.n ospamwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Hello,
I am trying to call a function (c#) from the repeater tool and I am not
sure
if I am calling the function correctly (since I am not getting the results
that I want).
Using
<asp:Literal id="ltrNewLine " text='<%# vbBlankRowMenu( "strMenuTyp e") %>'
runat="server" />
should send the value "Title" or "Link" to the function and it should
return
the string to create an empty cell.
When I added the "Eval" part, I got the error:
text='<%# vbBlankRowMenu( Eval("strMenuTy pe")) %>'
The best overloaded method match for 'mpColumn0302.v bBlankRowMenu(s tring)'
has some invalid arguments
C:\Inetpub\wwwr oot\gsttcsharp\ template\mpColu mn0302.master
Any help with this would be appreciated.
Thanks, sck10
<!-- Repeater: Menu Structure -->
<asp:Repeater id="rptMenu" runat="server">
<HeaderTemplate >
<table border="0px" style="width:99 %">
</HeaderTemplate>
<ItemTemplate >
<asp:Literal id="ltrNewLine " text='<%#
vbBlankRowMenu( "strMenuTyp e")
%>' runat="server" />
<tr>
<td style="width:10 0%;
text-align:left;"><% #Eval("strTarge t")%></td>
</tr>
</ItemTemplate>
<FooterTemplate >
</table>
</FooterTemplate>
</asp:Repeater><b r />
c# class
---------------------------------------------
public string strCategory = "NoParamete r";
public string vbBlankRowMenu( string strRepeaterValu e)
{
if (strRepeaterVal ue == "Title" && strCategory != "NoParamete r")
{
strCategory = "Insert Line next time";
return "<tr><td width=600 colspan=3>  ;</div></td></tr>";
}
else
{
strCategory = "Insert Line next time";
return null;
} // end if
}
Thanks sloan,
By the way, is there a link that talks about the proper notation?
Thanks again...
"sloan" <sl***@ipass.ne twrote in message
news:OB******** ******@TK2MSFTN GP06.phx.gbl...
your argument has to be an "object"
public string vbBlankRowMenu( object o)
{
string x = Convert.ToStrin g(o);
}
PS
FYI, strRepeaterValu e is hungarian notation, which isn't the preferred
notation anymore.
"sck10" <sc***@online.n ospamwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>Hello,
I am trying to call a function (c#) from the repeater tool and I am not
sure
>if I am calling the function correctly (since I am not getting the results that I want).
Using <asp:Literal id="ltrNewLine " text='<%# vbBlankRowMenu( "strMenuTyp e") %>' runat="serve r" />
should send the value "Title" or "Link" to the function and it should
return
>the string to create an empty cell.
When I added the "Eval" part, I got the error: text='<%# vbBlankRowMenu( Eval("strMenuTy pe")) %>' The best overloaded method match for 'mpColumn0302. vbBlankRowMenu( string)' has some invalid arguments C:\Inetpub\www root\gsttcsharp \template\mpCol umn0302.master
Any help with this would be appreciated.
Thanks, sck10
<!-- Repeater: Menu Structure --> <asp:Repeater id="rptMenu" runat="server"> <HeaderTemplate > <table border="0px" style="width:99 %"> </HeaderTemplate> <ItemTemplate > <asp:Literal id="ltrNewLine " text='<%#
vbBlankRowMenu( "strMenuTyp e")
>%>' runat="server" /> <tr> <td style="width:10 0%;
text-align:left;"><% #Eval("strTarge t")%></td>
> </tr> </ItemTemplate> <FooterTemplate > </table> </FooterTemplate> </asp:Repeater><b r />
c# class --------------------------------------------- public string strCategory = "NoParamete r";
public string vbBlankRowMenu( string strRepeaterValu e) { if (strRepeaterVal ue == "Title" && strCategory != "NoParamete r") { strCategory = "Insert Line next time"; return "<tr><td width=600 colspan=3>  ;</div></td></tr>"; } else { strCategory = "Insert Line next time"; return null; } // end if
}
Hi,
You may take a look at following MSDN Library documentation:
#.NET Framework General Reference: Naming Guidelines http://msdn.microsoft.com/library/de...us/cpgenref/ht
ml/cpconnamingguid elines.asp
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks Walter...
"Walter Wang [MSFT]" <wa****@online. microsoft.comwr ote in message
news:td******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi,
You may take a look at following MSDN Library documentation:
#.NET Framework General Reference: Naming Guidelines http://msdn.microsoft.com/library/de...us/cpgenref/ht
ml/cpconnamingguid elines.asp
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jeremy Ames |
last post by:
I am trying to use a datagrid to pull information from a database. I prefer
to use latebinding to this. Well, I finally got my information to populate
the datagrid, but the information came out in a table format. Is there a way
that I can make the datagrid use list box or some other kind of grid?
Perhaps I am using the wrong components. Someone please help.
|
by: Andrew Banks |
last post by:
I've got the following code as part of a C# web form but am having problems
calling a command. I create a dataset and put some data on the screen. This
works fine. (relevant sample below)
foreach (DataRow row in ds.Tables.Rows)
{
detailsbtn = new LinkButton();
//Assign a unique ID to the details control
detailsbtn.ID = "details" + row.ToString().Replace("-",
String.Empty);
|
by: John Holmes |
last post by:
I am using radioButton controls in a data repeater and would like to
incorporate the 'key' field into the 'id' attribute of the radioButton
controls and name them something like:
'rad' + '<%# (string)DataBinder.Eval(Container.DataItem, "ParcelID") %>' +
PropType1
I think part of the problem is that intially there is no data bound to this
repeater section. The data doesn't get built until the user clicks a button
on the form and then...
|
by: Kent P. Iler |
last post by:
Hi,
I have a data repeater that is returning a list of events. One of the
things I want to do is give the user a way to edit or delete an event. My
plan was to use an Imagebutton that would invoke a codebehind function that
would either edit or delete the item. My problem is I need to pass the
event_id as a parameter to each of these functions so I know what event to
edit/delete. The error code is complaining about the way I'm trying...
|
by: I am Sam |
last post by:
Hi everyone,
This problem is making me old. I don't want to get any older.
I have a multi-nested repeater control as follows:
<asp:Repeater ID="clubRep1" Runat="server">
<HeaderTemplate><table>
</HeaderTemplate>
<ItemTemplate>
| |
by: tenaka2k |
last post by:
OK I have poked around and have not found an answer to my problem . I
have a repeater that in it's <ItemTemplate> calls a function I want to
pass the current values from the repeater to the function. I have yet
to Figgure out how to get the Evals Data to goto the function as the
current code does not work. Producing an error of :
"System.InvalidOperationException: Databinding methods such as Eval(),
XPath(), and Bind() can only be used...
|
by: Brian |
last post by:
Using external XML, I'm trying to build a quiz, but I can't seem to specify the DataSource for the
RadioButtonList within a Repeater ItemTemplate.
I've tried a number of approaches, but I haven't really had any success. I'm pretty sure I should be
casting my XPathSelect() call to something so I can get at its attributes.
This seems like it should be easy, and maybe I'm missing something obvious. Does anyone have any ideas?
Here is the...
|
by: sck10 |
last post by:
Hello,
I am calling a function using vb and want to convert it to c#. When moving
from vb 1.1 to vb 2.0, I can use the following: text='<%#
AddBlankRowMenu(Eval("strMenuType")) %>' to call the function. I no longer
need to use "DataBinder.Eval(Container,"DataItem." in front of the DataItem.
However, when I tried to use the new syntax in c#, I got an error. However,
the older syntax works.
Am I missing something, or does c# require...
|
by: Eugene Anthony |
last post by:
The problem with my coding is that despite removing the records stored
in the array list, the rptPages repeater
control is still visible. The rptPages repeater control displayes the
navigation link (1,2,3 so on). The code can be found in
SubscriptionCart.aspx.cs.
Default.aspx
------------
|
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |