473,779 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to call a method (code behind) from the asp.net front end by passing parameters

5 New Member
I am executing a select query in a C# component and populating a ASP Grid in Search.aspx.
Now one of the columns in the Grid in Search.aspx is Policy Number(hyper link)
Basicallly I want to call a ASP.net method by sending parameters from that link.
For example
Select a, b, policy_number from x

Policy_Number is the hyperlink.

Now I want to call a ASP.net method sending in a and b as input parameters.

Basically all i want to know is how to call a method (code behind or java script) from the asp.net front end by passing 2 parameters.

Can you please help me here. Thanks
Jul 3 '07 #1
2 2907
dip_developer
648 Recognized Expert Contributor
I am executing a select query in a C# component and populating a ASP Grid in Search.aspx.
Now one of the columns in the Grid in Search.aspx is Policy Number(hyper link)
Basicallly I want to call a ASP.net method by sending parameters from that link.
For example
Select a, b, policy_number from x

Policy_Number is the hyperlink.

Now I want to call a ASP.net method sending in a and b as input parameters.

Basically all i want to know is how to call a method (code behind or java script) from the asp.net front end by passing 2 parameters.

Can you please help me here. Thanks
whats the problem????
if you have a class which holds the method you are calling...then just create an instance of that class and call the method with parameter...

//Suppose policyNumClass is the class name and policyNumMethod is the method then

Expand|Select|Wrap|Line Numbers
  1.  policyNumClass myClass; 
  2. myClass.policyNumMethod (a,b);
  3.  
Jul 4 '07 #2
radcaesar
759 Recognized Expert Contributor
ASP .NET Front end ?

ASP .NET is the front end here. What you exacly want to do ?
Jul 4 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
6704
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft Visual Basic .NET version of this article, see 308049. For a Microsoft Visual C++ .NET version of this article, see 310071. For a Microsoft Visual J# .NET version of this article, see 320627. This article refers to the following Microsoft .NET...
24
2630
by: ALI-R | last post by:
Hi All, First of all I think this is gonna be one of those threads :-) since I have bunch of questions which make this very controversial:-0) Ok,Let's see: I was reading an article that When you pass a Value-Type to method call ,Boxing and Unboxing would happen,Consider the following snippet: int a=1355; myMethod(a); ......
5
1288
by: TS | last post by:
From my presentation layer, I call a validation method in my business layer that i pass a custom class to that holds all parameters. I am currently also passing an error message by reference so that the calling code can have this string set to an error message inside this method. I'm wondering 2 things: 1. Should i put the errorMessage param as a property on args and pass the whole thing as reference? 2. Is there a more elegant...
2
2517
by: Marek | last post by:
Hi I'm trying to call a native C++ dll using the following code (both C# and C++ code segments included). When I make the call to the method (AddTwoDoubles) that has no return value all is fine. When I try and call a function that returns a double (AddTwoDoubles2) I get the following message: PInvokeStackImbalance was detected Message: A call to PInvoke function 'tempModule!<Module>::AddTwoDoubles2' has unbalanced the stack. This is...
1
3213
by: Eric | last post by:
When I run my script it gives error on the following line: strEmail = Right(strEmail, (Len(strEmail) - 1)) I enclose my code and the sample text file too Thanks, ----------------------------------------------------------------------------- Option Compare Database Option Explicit Private Sub Command26_Click()
10
16675
by: ravi | last post by:
Hi, i am a c++ programmer, now i want to learn programming in c also. so can anybody explain me the difference b/w call by reference and call by pointer (with example if possible).
4
1721
by: Dom | last post by:
In the days of VB, it was possible to do the following: "Call Button1_Click()", although there was some argument about whether this was asking for trouble. Is it possible to do it in CSharp? The trouble that I see is that every event handler needs arguments. But can you do something like "Raise Button1_Click"? Dom
1
7205
by: mikegolden | last post by:
An application I'm working on makes extensive use of output parameters and return values, thus forcing me to use the ADODB Command object to execute the stored procs. For recordset returning stored procs, calling Execute() is no problem using JavaScript: var rs = cmd.Execute(); However, for non-recordset returning stored procs -- and this app has many -- I need to call Execute() passing adExecuteNoRecords for the Options parameter,...
9
3138
dmjpro
by: dmjpro | last post by:
************************** Sorry the title would be Overriding. Please experts, correct the title ;) ************************** Method signature includes ... 1.Modifiers 2.Return type 3.Method name 4.Number of passing parameters and types of parameters 5.Throws clause
0
9474
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,...
0
10306
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, 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...
0
8961
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, 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...
1
7485
isladogs
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...
0
6724
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();...
0
5373
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...
1
4037
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
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
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...

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.