Web Forms :: Calling A Codebehind Function From An Aspx Page?

Apr 17, 2010

I have a function that returns an image name from an Array, and takes the array index as a parameter, something as follows:

public string imageGallery(int imageNumber)
return "~\webForms\profileAdmin\uploadedImages\serkijn\" + iArray[imageNumber].ToString();

On the aspx page I have something like this:

<img src='<%# imageGallery(0) %>' />


View 3 Replies

Similar Messages:

Web Forms :: Calling Codebehind Vb.net Function From Aspx Page And Itemcomand In Repeater?

Jun 30, 2010

I have been trying to call a vb.net function in aspx page how can i do that?. I have done it in C# by

<td><#%GetItemIndex(Container.ItemIndex)%></td> its working fine in C# but in vb.net it says GetItemIndex not declared.

and trying to convert (rptpages is a repeater)

rptpages.Itemcommand += New RepeaterCommandEventHandler( rptpages_ItemCommand1) from C# to VB.net but i dont see itemcommand property in VB.net for the repeater.

View 15 Replies

C# - Calling A Codebehind Method From Aspx Page From Gridview?

Nov 23, 2010

How do you call a codebehind/class method from a gridview in an aspx page? Also, I need to pass the value of databound column to that method. Is this possible?

Something like this:

<asp:BoundField DataField="Precision" />
<asp:BoundField DataField="MyNumber" DataFormatString="FormatHelper.Format(MyNumber, Precision)" />

View 3 Replies

Web Forms :: Calling Function On Different Aspx Page?

Jun 16, 2010

This is such a simple thing but i can't figure it out.

I have this code: (just a section)


Here is the code behind:

I can get it to work if i completely paste the code in there, but this is such a pain. I just dont quite understand OOP. What do i have to write to call that code from another aspx page?[Code]....

View 12 Replies

Web Forms :: Calling Function In Codebehind

May 11, 2010

I have a master that I am trying to load a certain stylesheet based on some data. I have a function in the code behind of the master page:


Then in the head of the master, I have:


I've tried "Eval" too but if I set a breakpoint in the LoadFacilityStyles function, it never even gets triggered/called. Is this possible to do with .master?

View 4 Replies

Web Forms :: Calling Jquery Function From Codebehind?

Oct 14, 2010

I have the following jquery function that displays a page loading message once the user clicks submit.


This works just fine. But i do have some validations on page that i have to check and throw error if they don't fill certain fields on the form. Having this function on the ClientClick event, its fired each time the button is clicked. How could i fire this function on the codebehind once i am done with all my validations?

View 2 Replies

Web Forms :: Calling A Codebehind Method From Aspx?

Mar 9, 2010

I have a code behind which i need to call from the aspx page. Below is the the code in aspx and code behind.


<a href='<%# ChangeAlphabet("0") %>' >All</a> </li>

View 7 Replies

Web Forms :: Calling A Public Function In Default.aspx.vb From Class File?

Dec 2, 2010

Is there a way to call a public function from a class?


View 4 Replies

Web Forms :: Calling A Function Before Page Redirection?

May 3, 2010

I 've some session variables which are used on a page, i want to clear those session variables as soon as user is redirected from this page,

Is there any method which i can call before user is redirected from this page ?

View 10 Replies

Web Forms :: Calling A Function On Master Page From A Content Page?

Jun 26, 2010

i have this function on my master page, i want to call it from one of my content page, what should i do?

function showAddress() {
var txtAddress = document.getElementById('txtAddress');
var address = txtAddress.value;
function (point) {
if (!point) {
alert(address + " not found");
else {
map.setCenter(point, 15);
var marker = new GMarker(point);

View 5 Replies

Web Forms :: How To Call A Javascript Function From CodeBehind On Page Load Event

Jan 20, 2011

How would you call a Javascript Function from CodeBehind on Page Load event without : Ajax (ScriptManager), Response.Write ?

View 2 Replies

Write In .aspx Page Or .aspx.vb(Codebehind) / Which Is Best

Jun 8, 2010

i want to know, if is better to make an entire page in the aspx file or in the aspx.vb file...

if you have to decide, which one do you choose?

ie in aspx:

HTML Code:


View 5 Replies

Write .aspx Page Or .aspx.vb (Codebehind)?

Jun 8, 2010

i want to know, if is better to make an entire page in the aspx file or in the aspx.vb file. If you have to decide, which one do you choose? ie in aspx:

<asp:Table ID="Table1" runat="server" Width="980">
ie in aspx.vb:
dim tabla as new table
tabla.id = "Table1"
tabla.width = 980
dim fila as new tablerow
dim celda as new tablecell
celda.text = "SOME TEXT"

View 9 Replies

Web Forms :: Calling An Exe From An Aspx Page

Jun 20, 2010

Regarding the above topic I want to know the following:

1) Is it possible to call the exe from an aspx page with or without parameters?If so client side call or only server side call?

2) What permissions need to be given for it to be accessible - the exe needs to do data transfer with postgres?

3) How to diaplay the output of the exe on the client side in Labels or alert boxes?

Any other problem that may occur while executing exe from the aspx page?

View 7 Replies

Web Forms :: Calling An Aspx Page With New Window?

Mar 10, 2011

I have an web application in a server.there is an aspx page i need to call an aspx page with new window using response.write().

ex: Response.Write("www.abc.com/page1.aspx");

But it will open the page in the same window but i want to open the page in new window.

View 4 Replies

Web Forms :: ASPX Page Calling Web Service Asynchronous

Jun 17, 2010

I need help calling a web service asynchronously. Current scenario is, I have a classic ASP page which does some processing and then redirects to a ASPX page which would call the wcf service asynchronously and then redirect to another classic ASP page. Im currently using the Asynchronous method to call the service with Async="true" included in the header. Testing the ASPX page induvidually it appears that the service call is asynchronous and does not wait for the the service to process data. But when integrating it with classic ASP page i.e ASP to ASPX to ASP it appears that the process takes a while as if the service call is synchronous.

So is there a better idea to use in calling a wcf service asynchronously. The idea behind my work flow is the ASPX page would be used to call the service and then the ASPX page would redirect back to the classic ASP page is came from. Let me know if there is a work around on how to call async wcf service in aspx page. I dont need the ASPX page to wait for a result or anything it is just used to call the WCF service async

View 1 Replies

Web Forms :: Calling A Public Method On Aspx Page From A Usercontrol

Sep 7, 2010

I have a problem with calling a method on a aspx page from a usercontrol.

The case is: I have 1 main page with 5 usercontrols, when something goes wrong in the code I want to display the error message in a Modalpopup Extender. I can create for each usercontrol a different modalpopup extender but isn't much easier when I make 1 popup in the aspx page. But the problem is: How should I call a method in the aspx page that open the popup?

I have search several hours on the internet but can't find anything useful.

View 2 Replies

Calling A C# Function From Page?

Jul 1, 2010

I wrote a small function in C# that manipulates pdf files using itextsharp. Is it possible to call this function from a classic asp page?

View 6 Replies

How To Call Codebehind From An Aspx Page

Aug 2, 2010

I need to have something similar to onclick for a <asp:menuitem, is there an easy way to do this?

View 1 Replies

Mvc Return Data From Codebehind Of Aspx Page?

Jun 3, 2010

there I have a situation where I need to make to call to a normal .aspx page from asp.net mvc web application. How can I make this request and get data back from the page. the data will be returned on on the page_load event of the .aspx page

View 2 Replies

C# - Access Object In Codebehind From Aspx Page?

Sep 24, 2010

C# or VB.NET are welcome.

I have an <%#Eval("FirstName")%> in the aspx page, I want to replace "FirstName" to <%#Eval(employee.FirstName)%> but "employee" object
is instantiated in the codebehind like this:

Public employee As New Employee

How can I call this object in the aspx page? Should I can create an "employee" in the aspx? if so, how to do that.

View 2 Replies

Calling Javascript Function Inside Page?

Mar 11, 2011

using vb.net/asp.net 2005

I have a content page (<asp:content>) where I am using javascript and normally I am adding the attribut in the code-behind page. however I now need to add a javascript function that will cause when the body or panel loads. I have a test javascript function that simply shows an alert box but I cannot get it to display. Is there a special way to do this in a content page?


View 3 Replies

Dropdownlist - Dropdown List In Codebehind Versus In ASPX Page

Feb 17, 2010

I am generating a dropdown list in codebehind and cannot get the selectedindexchanged event to fire automatically. It works fine when put directly into the ASPX page, but I need it to be in the codebehind.

This doesn't work -


View 4 Replies

Visual Studio :: Providing Linenumbers In Aspx Or Codebehind Page?

May 7, 2010

how can I ensure linenumbers in aspx or vb page when opened in visual studio

View 2 Replies

ADO.NET :: Getting Error While Calling Dataset In ASPX Page?

Nov 25, 2010

I wrote many Dataset in APP_CODE folder and call it in my ASPX Page. But the following error Occured in my aspx Page when i call atset.


'DATASET NAME(.XSD)' does not contain a definition for 'DATASET OBJECT NAME' and no extension method 'DATASET OBJECT NAME' accepting a first argument of type 'DATASET NAME(.XSD)' could be found (are you missing a using directive or an assembly reference?)

But when i Build the application some times it's execute with out error. but some times it show's an error. And also i get error in different

dataset in every time when i Re-build the application.

View 3 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved