How To Pass A String From .aspx To A Class

Feb 24, 2010

I need to pass a string from my .aspx page to my .VB class.

i need to capture (device_category; accept_headers : user_agent) and pass the values to my class, i tryed to captur the values on the clas itself but i got an error(valuse are not member of this class..)

How can i have a string accessable to my class?

View 10 Replies


Similar Messages:

C# - Pass An Id Number String To Class?

Apr 14, 2010

I'm very much a vb person, but have had to use this id number class in c#. I got it from [URL]

using System;
using System.Text.RegularExpressions;
namespace Utilities.SouthAfrica
{
/// <summary>
/// Represents a South African Identity Number.
/// valid number = 7707215230080

[code].....

View 3 Replies

C# - Can Execute An Aspx File In A Class Library And Get The Result As A String

Feb 19, 2010

I have an c# Class Library where I need some dynamic template based text. Instead of inventing my own template parser I thought I could create an aspx file in my project that is executed at runtime and, instead of viewing the output in a browser, I want a StreamReader or string object that holds the result.

View 3 Replies

Web Forms :: Pass The Selected Value Of A Dropdown List From Page1.aspx To Page2.aspx?

Mar 11, 2010

I have 2 pages Page1 has a dropdownlist, page2 has this on pageload:

View 5 Replies

AJAX :: JavaScript Function To Pass Value From MasterPage.aspx To Default.aspx And Then Refresh UpdatePanel

Feb 26, 2011

For example, I have master page MyMasterPage.aspx and content page MyDefault.aspx. I have many UpdatePanels at MyMaterPage.aspx, and also I have many UpdatePanels at MyDefault.aspx.

[code]....

I want JavaScript functionClickMenu(this) at input button [id="ButtonMaster1" @ MyMasterPage.aspx] pass its value ["Menu-1"] into text box [id="TextBoxDefault1" @ MyDefault.aspx], and then performing update / doing post-back to server ONLY FOR UpdatePanelDefault1.

I am looking forward an example code for JavaScript functionClickMenu(this).

View 4 Replies

List All Classes In Application (Including Class In App_Code And Partial Class(aspx Pages And Asmx User Controls)?

Nov 15, 2010

Is there any way to list all the class in my ASP.Net application(Including class in App_Code and Partial Class(aspx pages and asmx user controls)

View 3 Replies

C# - Referencing One Aspx.cs Class In Another Aspx.cs Class?

Aug 29, 2010

Does anyone know how to reuse the code from one aspx.cs class in another aspx page?

View 5 Replies

Changing The View (.aspx) From The Code-behind (.aspx.cs) Class?

Nov 1, 2010

I have a 'classic' ASP.NET app (.NET 3.5) with a pretty standard runat="server" style form with server-side controls and an 'Execute' asp:button. In the code-behind, the executeButton_click handler processes some of the other controls, runs a report, and drops the result into an asp:label. So the effect of pressing the Execute button is that the entire page reloads with the report inserted into the label.

I need to change this so that when the Execute button is pressed, the report pops up in a new window with a different layout (ie without the controls and form). If I was doing this in an MVC framework I would just change the view template in the 'execute' action, so the analogue for ASP.NET would be change the code in front, ie the .aspx file that gets used, from the code-behind class.

Is this possible? I know the link between the .aspx and the .aspx.cs isn't extremely tight as it is possible to reuse a code-behind class in multiple .aspx files. So can I set the .aspx file to render from the code-behind?

View 2 Replies

Web Forms :: How To Pass The Value From .aspx Page To .aspx.cs

Oct 19, 2010

I have to pass the value [sysid] for getting the value from another table.

I coded asp:

[code]....

View 7 Replies

State Management :: How To Pass Dynamic String Through Query String With Java Script

Dec 24, 2010

I m facing some problem. i m not passing Dynamic string through query string..

I m using this code

string abc = "CPCB_" + TextBox1.Text + "_" + TextBox2.Text;

Response.Write("<script>window.open('xml.aspx?Flag=3&date='+abc,target='new');</script>");

View 2 Replies

C# - How To Pass A Class Into Another Class To A Codebehind

Aug 3, 2010

How to pass a class into another class to a codebehind?

When I debug and check the myCategoryObj in the Default.aspx page, I can see the object is in the debug. What am I doing wrong?

I know I could create the object in the Default.aspx but I should not have to I should be able to call the Business Logic Layer and ask for an object back and then fill the object and pass it back to the Business Logic Layer to be saved (insert or update).

[Code]....

View 1 Replies

Can A Aspx Page Have More Than One Aspx.cs Class To Inherit

Nov 30, 2010

i want to know, can one aspx page have two or more code behind page?

like if i have page collge.aspx, by default it will inherit college.aspx.cs, i want to know can't it inherit more then one aspx.cs. If not then why?

View 3 Replies

C# - Cannot Pass A Input From Text Box To A Query String And Then Keep The String In This Box?

May 28, 2010

I have a simple ASP.net page:

<form id="form1" runat="server">
<p><asp:TextBox id="input_box" runat="server"></asp:TextBox>
<asp:Button Text="OK" runat="server" OnClick="run" /></p>
</form>

I want to send input from input_box to a query string, and then keep this input in the input_box when the page reloads.

That's the code behind page:

protected void Page_Load(object sender, EventArgs e)
{
input_box.Text = Request.QueryString["input"];
}
protected void run(object sender, EventArgs e)
{
string url = string.Format("?input={0}", input_box.Text);
Response.Redirect(Request.Url.AbsolutePath + url);
}

Problem is that when query string is not empty, string from input_box cannot be passed to query string. How to correct it?

View 1 Replies

Pass The Text Value From .aspx To Aspx.vb?

Mar 5, 2011

how to pass the text value from .aspx to aspx.vb? im using asp.net(VB).

View 3 Replies

State Management :: Pass The Value To ASPX.CS File To ASPX File?

Mar 31, 2010

I want to pass the value to ASPX.CS file to ASPX file.

So how can i pass the value in the ASPX file.

View 8 Replies

How To Pass Value Object Class Dynamically

Jul 14, 2010

i have 10 classes and i want to send the class in a paramenter dynamically to call a method for example int addmember(aslogic.base obj) smilary i want to pass class in the parameter.

View 4 Replies

ADO.NET :: How To Pass The DataTable From One Method To Another In The Same Class

Aug 17, 2010

I am learning Asp.net web application. I have one doubt.

Is it possible to pass the DataTable from one Method to another in the same class?

View 4 Replies

MVC :: How To Pass Textbox Value To Controller Class

Oct 8, 2010

How to pass the textbox value to my controller there is no form and post method in the viewpage.I have taken one input type textbox which is not bind with my model.I need to access that value to controller

View 13 Replies

DataSource Controls :: Pass Selectparameters To A DAL Class?

Mar 16, 2011

I have a webform whose ObjectDataSource reads an xml file to populate a GridView in the .aspx page. I have to hard code the file path in the .cs file defining the ObjectDataSource classes. I want to be able to use a portion of the query string to indicate which file to select, but, normal methods, like Server.MapPath and Http.Request.Current don't work in the class page. how I can pass values from the SelectParameters configured in the ObjectDataSource down to the ObjectDataSource method? Here is my Class code:

[Code]....

The filePath variable is what I want to be able to alter based on my query string.

View 1 Replies

ADO.NET :: Unable To Pass Parameter To A Business Class

Oct 22, 2010

I am getting this error

Must declare the scalar variable "@InvoiceNumber". in the following code, although i declared InvoiceNumber as a parameter in the Datasource object.

public class GetDetails
{
public static DataSet Details(string InvoiceNumber)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);

[Code]....

View 2 Replies

To Pass A Value From Ascx To Aspx?

Jan 12, 2010

I have a Menus user control and depending on which menu item the User clicks, the appropriate page is loaded by setting the hyperlink.NavigateUrl to the appropriate aspx page.I need to use the same page for 2 different menu items but I need to pass a value to the page so I know which data to load into it.Is there a way to pass the menu name or any other value from the usercontrol to the asp.net page?

View 12 Replies

Web Forms :: Pass An Event Handler To Helper Class?

Sep 18, 2010

I have a static class (an helper class) which has the responsability to create control and add them to a panel passed by parameter, this method is used by a lot of

View 5 Replies

Web Forms :: How To Pass Value From One Aspx Page To Other

Nov 10, 2010

howto pass value from one aspx page to other.In this on one page i have radgrid when i am click on button the how to select the value of selected grid item and then how to pass that value to other page.

View 8 Replies

Vb.net - Pass Variable From Code Behind To .aspx

Sep 25, 2010

I guess I'm missing something here, but I can't find a way to pass a simple variable from my code behind file to the .aspx page. In code behind I have:

Dim test As String = "test" and in my aspx page I try: <%=test %> that gives me the following error:
Error 2 'test' is not declared. It may be inaccessible due to its protection level

View 4 Replies

Pass A Value From An ASPX Page To Another In A Different Domain?

Sep 21, 2010

I have an ASPX page in my Application. ASPX pages from other applications in different domaincan call this page. But how do I return a value to the calling ASPX page in a different application?How an ASPX page can return a value to calling page in a different app?

View 1 Replies







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