Forms Data Controls :: Pass Parameter To Subroutine In Codebehind?

May 28, 2010

I'm trying to pass in an ID of an activity (RefNum) to my codebehind via OnDataBound called in the CheckBoxList, but can't seem to find the correct syntax.

I know I'm supposed to use parentheses when passing parameters to subroutines and methods, and I've tried a number of ways and keep receiving the following error:

BC30203: Identifier expected.

So I tried to hard-code it in the code below [ OnDataBound="FillSectorCBList("""WK.002""")" ], but it's obviously wrong. :(

Front-end:

[Code]....

Code-Behind:

[Code]....

View 6 Replies


Similar Messages:

Web Forms :: How To Run Subroutine Or Activate Event For Control In Content Page From Codebehind

Jan 12, 2011

I am not trying to activate an event or run a subroutine from a control from the masterpage, I am trying to activate or run from VB codebehind of the master page.

I have a button in a content page with a particular .click even that I want to activate from the masterpage codegehind periodically.

Also, how do I access or run a subroutine in a content page from codebehind in a master page.

View 7 Replies

Web Forms :: Using VB - Call Subroutine In Code Behind In Content Page From Subroutine?

Feb 25, 2011

I have a subroutine in a content page that I want to be able to call from codebehind of a subroutine in a master page.

View 4 Replies

Forms Data Controls :: Pass Parameter To GridView?

Jan 7, 2011

I am trying to pass a URL parameter to a web page that contains a Gridview to make that query dynamic

The URL is http://localhost:3036/people2.aspx?ArvDate=01/03/2011

I would like to add that parameter to the Select statement below (bolded)

<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:sqlConnection %>"
SelectCommand="SELECT NumPeople, Date1,Time1,Venue FROM People_Count WHERE Date1=XXXXXXXXXX and c

I already have this code to capture from the URL

Dim strPar As String
strPar = Request.QueryString.Item("ArvDate")
If strPar = "" Then strPar = DateTime.Now.ToString("d") [code]....

I just don't know the syntax to get it in that SQL Select statement

View 2 Replies

Forms Data Controls :: Pass Parameter When Inserting?

Jun 8, 2010

I have a listview that has a hiddenField in the ItemTemplate. I want to pass this hidden control as control parameter when inserting a new record.but i get the errorCould not find control 'hiddenFieldID' in ControlParameter 'ID'.I also tried to access it in the ItemCommand event of the list view but it returns null.

<ItemTemplate>
<asp:HiddenField ID="hiddenFieldID" runat="server" Value='<%# Eval("reviewID") %>' />
</ItemTemplate>

[code]...

View 6 Replies

Forms Data Controls :: Pass Value To Gridview Parameter?

Sep 3, 2010

I have grid view and i want to pass parameter value for it from where clause...

my parameter value is not control, or session or cookie.its a variable ...how can i pass this variable to grid view parameter?

View 6 Replies

Forms Data Controls :: Pass Databse Value To Asp:parameter Field?

Jan 11, 2010

i m using Datalist control on that i have one section as a "Qty" which come from database .now how i can pass two values in <asp:parameter from database

look at my code

<asp:Parameter DefaultValue="<%#DataBinder.Eval(Container.DataItem, "ItemID")%>"Name="mItemNo" Type="String" />

if i write anywhere in datalist then it worlks , but not in this DefaultValue parameter , coz whenever that datalist item get bound one by one row then DefaultValue may get change and depend on that Default value my Quantity section also get changenx

View 11 Replies

Forms Data Controls :: Pass Parameter Value Of One Databound Dropdownlist To Another

May 24, 2010

I am trying to select a value, automatically, out of ddlCounsellorNameb by selecting a value in ddlCounsellorID. I've been getting a databinding error whenever the first dropdownlist posts back. How do I do about this without getting an error?

[Code]....

View 2 Replies

Forms Data Controls :: Pass Function As Parameter To Show In Gridview?

Sep 4, 2010

I have one common Data Access function which returns output as datasetwhich is as below

Public
Shared
Function ExecuteDataSet(ByVal sql

[code]...

View 5 Replies

Forms Data Controls :: Pass Checkbox Value To A Parameter At The Time Of Update?

Jul 4, 2010

in a grid view i have a checkbox column ,which is making checked based on the char value from the SQL DB.

In SQL DB field type is char(1).

My requirement is , need to pass "Y" if checkbox is true ,and "N" if checkbox is false.How to pass that parameter in an update statement.

How it is possible?I used the parameter like as follows.But it is giving me an error when i click update.Groupid parameter is working perfect.The error is coming from the "HPermission" parameter.

<asp:BoundField DataField="GroupID" HeaderText="GroupID" InsertVisible="False" ReadOnly="True" SortExpression="GroupID" />
<asp:TemplateField HeaderText="Hud" >
<ItemTemplate>
<asp:CheckBox ID="chkStatus1" runat="server" AutoPostBack=false
Checked='<%# Convert.ToBoolean(Eval("HPermission").ToString().Equals("Y")) %>'
/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
UpdateCommand="exec [dbo].[GridUpdDel] @GroupID,@HPermission,'UPDATEPERMISIION',0,'',''" >
<UpdateParameters>
<asp:Parameter Name="GroupID" />
<asp:Parameter Name="HPermission" />
</UpdateParameters>

View 3 Replies

Forms Data Controls :: Pass A Parameter In DropdownList's Datasource Inside The Gridview?

Mar 31, 2010

I have 2 dropdownlist(ddlCategoryFooter and ddlItemCodeFooter)inside my gridview. I want to set ddlItemCodeFooter 's datasource to my getItemList(decimal categoryID) method. The selecteditem of ddlCategoryFooter will serve as the paramter which will be passed to my getItemList Method. Basically,ddlItemCodeFooter is dependent on ddlCategoryFooter's selectedItem.

I know it can be done in code behind approach but i prefer to place it in my asp page.

This i what i want to acheive:

DataSource ='<%# getItemList(Convert.ToDecimcal(ddlCategoryFooter.seletectItem))%>'/>

Source code for my Gridview:

[Code]....

View 8 Replies

Forms Data Controls :: Pass Parameter To Object Datasource In User Control?

Jun 30, 2010

I have a gridview inside a user control bind to an object datasource. Now I want to bind the object datasource with a parameter from parent page.

For this purpose I defined a public property in user control but how do I pass it with object datasource ?

I am calling from parent page like

myusercontrol.parameter=querystring["id"];

How to bind object datasource with my parameter ?

View 4 Replies

Forms Data Controls :: Selecting A Row In GridView To Operate A Subroutine?

Jan 20, 2010

I have a GridView control which is populated by an SQLDataSource. When I select a row the details are shown in a DetailsView control. Is it possible to intercept the select and run a VB subroutine at the same time so that I can make a Panel in a separate part of the page disappear?

View 2 Replies

Forms Data Controls :: How To Pass Session Variable As A Parameter To Inline Function Written Inside A Repeater

Jun 26, 2010

I am working with a repeater control for a reporting purpose.

I have 2 repeaters one inside another , i hvae to bind the second repeater with the help of function which is having two parameters to pass in it

<asp:Repeater
ID="Rptgsaaccount"
runat ="server"
DataSource ='<%#bindcourse(Eval("Session_Id"),2nd parameter)%>'>

the first parameter is i am easily getting from outer repeater, but the second parameter value is exist on the server side and in a session variable

i have to pass this server side session variable value in above mentioned function as a second parameter .

View 2 Replies

Forms Data Controls :: ASPxRadioButtonList Inside ASPxDataView Within Item Template - Pass Parameter To Second SqlDataSource (id) To Fill RadioButtonList Property

Aug 29, 2010

I have ASPxDataView and ASPxRadioButtonList within item template. i also have two SQLDataSource's (first fill ASPxDataView, second ASPxRadioButtonList). They are using other database tables connected with the foreign key. Is there any way to pass parameter to my second sqlDataSource (id) to fill RadioButtonList property ? i mean select * from TABLE2 where id = @id ; (@id is a value from TABLE1 which is a value of column returned by first sqlDataSource)

View 3 Replies

Data Controls :: Pass Multiple Values For Single QueryString Parameter

May 7, 2015

i want to pass multiple arrays variable in query string.for example i have three checkbox list Brand ,Price, Attribute any arrays variable may have more than one value key arrays variable are fixed for checkboxlist

1-checkbox list Brand has Brand []arrays variable

2-checkbox list Price has Price []arrays variable

3-checkbox list Attribute has Attribute []arrays variable

now i have selecting two -two from every checkbox list .than i want to query string something like this

www.defualt.aspx?brand[]=samsung=123&apple=11,Price[]=100=12&200=2,Attribute []=camera=1&display=2

View 1 Replies

Data Controls :: Pass DataTable Or Dataset As Parameter To WebMethod Of WebService

Mar 16, 2014

can datatable pass to web service as input parameter? i have a scenario to pass values as datatable to web service. eg as follows

when Invoice or Bill is entered, I want to send the entered data as datatable to web service to insert into another application.

View 1 Replies

Data Controls :: How To Pass TextBox Value To Another Page Using QueryString Parameter On Button Click

Jan 9, 2014

I have passed the value from one page to next page using a querystring. In the next page i need to get the value from the query string and based on the value, it needs to checked with the database and the result set should be placed in the gridview, details view or listview anything else. 

Ex: Response.redirect("user.aspx?id="+userinput.text);

 userdetails.aspx?id=vicky - url

table:

user           mobileno                email
vicky           9848752322         ervigsh@gmail.com 

In the details view or list view control, I need to get the value vicky from the url and based on the value's row in the database table need to be binded in any of the mentioned above controls.

View 1 Replies

DataSource Controls :: Set A Insert Parameter That Receives The Record Identity In Codebehind

May 18, 2010

How do I set my insert identity return value parameter in codebehind? I have working code now but i have all of my parameters set in codebehindexcept the following:

[Code]....

View 6 Replies

Web Forms :: Pass Selected Value Of DropDownList Select Parameter Of SQL Data Source

Sep 20, 2015

I am binding a control which is inside Gridview, using SqlDataSource control as below.

<asp:ComboBox ID="ddlCompany" runat="server" Height="200" Width="240"
DropDownWidth="310" EmptyMessage="- Select Product -" HighlightTemplatedItems="true" CausesValidation="false"
Filter="Contains" AppendDataBoundItems="true" AllowCustomText="true" AutoPostBack="true"
DataTextField="Title" DataValueField="Code" OnSelectedIndexChanged="ddlCompany_SelectedIndexChanged">
</asp:ComboBox>

[code]....

In above SqlDataSource control, I had to pass the SelectParameter (whose value is coming from a ComboBox i.e., whatever comboBox value I selcect from ComboBox, its SelectedValue I had to pass it to the SqlDataSource SelectParameter. I am first time using "SqlDataSource". How to pass the SelectedValue of ComboBox into SlecteParameter of SqlDataSource control ?

View 1 Replies

Web Forms :: Store All Data Including Data From User Control Or Subroutine?

Oct 21, 2010

I have a user control with data of person. iN this user control is subroutine which storing data to database of person.On my ASPX page I've implemented this control and another form with data which ii'm storing.On button click on ASPX page, i want to store all my data including data from my user control or subroutine in that user control which storing data of person.I want to make sqltransaction, so only one connection for aspx page and user control.ASPX.vb

[code]...

The point of my question is how to interact between my class where i have methods and user conttorl on aspx page.

View 5 Replies

DataSource Controls :: How To Pass Optional Parameter

Apr 22, 2010

I am getting return some data through stored procedure in a asp.net 3.5. Below is the method.

public DataSet GetDataSet(string strConnection,string strSPName, string param1)
{
DataSet ds = dataAccessLayer.getDataSet(strConnection, strSPName);
return ds;
}

In some cases, I have to pass 3-4 parameter. How can we do pass optional parameter here....

View 3 Replies

DataSource Controls :: Pass Default Value To A Sql Parameter?

Sep 23, 2010

I'm trying to pass default value to a sql parameter which is

[Code]....

View 1 Replies

MVC :: Pass Data From View To Master Page / Can Also Specify A Parameter

Jul 12, 2010

Can a view pass some sort of model like data to a Master page? I am using the ViewData collection, but that makes for confusion in my code. When I specify the Master in the View, can I also specify a parameter?

View 1 Replies

Custom Server Controls :: Pass A Variable Through A Parameter?

Jan 26, 2010

This may be elementary user control stuff, but I can't get it to work.

How can I pass the Membership.GetUser.UserName variable (or any variable) through a user control parameter at load time?

[Code]....

The only thing that I was able to do was to create the User Control object in the code behind and then add it to the page. Although that works, it doesn't seem like the correct way to program.

View 1 Replies







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