MSDN Magazine November 2000
View Complete Post
how to pass the value from one page to another page in asp.net with out Using State Management Concepts?
Like 1. cookies
With out using the above should pass the values...
We have a part of our website which is coded in classic asp. This takes the values of a login page (asp.net) which uses
<input type="text" /> to hold the values and then submit them to the asp page using the following line of code -
<input type="submit" value="Login" onClick="this.form.action='<%= SubmitURL() %>/login/login_user.asp?Type=Login&this.form.encoding='application/x-www-form-urlencoded'; this.form.submit();" />
The asp page then retrieves the values using the code -
Value1 = Request.Form("Val1")
We now have a requirement to pre-populate the login values to provide an automated login process but don't want to change the older asp code. When we try to assign values to the input text in the asp.net page by assigning the value runat="server" the login fails as it does not seem to carry over when the page is submitted.
Is there a way where we can pre-populate the html textbox without making it unavailable to the asp page?
MSDN Magazine March 2001
I'm building a user control to display detail information on a parent record. The user control will be displayed via an Ajax Modal Popup. The user control works and is displayed when expected. The problem that I'm having is that I'm not able to pass in the primary key for the parent. The control is displayed via the _ItemCommand event of a Repeater. In the markup for the user control, I explicity set the ContactId to 0 to avoid an error when the control loads (its still underdevelopment, eventually that I'll check if the value is valid).
I was assuming that I could change the property in the _ItemCommand event, but obviously its not working.
In the Page_Load event this code successfully sets the ContactId property of the control. The _ItemCommand event appears to set the value. However when I set a test label on the user control to the Me.ContactId, its showing '0' as if it was never passed in.
UserControlContactDetail.ContactId = "1462"
test.Text = UserControlContactDetail.ContactId
Protected Sub RepeaterDirectory_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles RepeaterDirectory.ItemCommandProtected Sub RepeaterDirectory_ItemCommand(By
I have an asp.net page with a vb code behind file. I also have a simple menu built with an unordered list which is controlled by jquery. Basically, how do I pass a value from the vb code behind file to the jquery? At the moment im assigned the value to an asp:label that I'm able to read in jquery, but it's a bit messy. Is there a better way of doing it?
I get a message that x_login is not declared. I added Dim login as String = "123", but that didn't help. What's the problem?
Dim Login = "123"
x_login.Value = loginID
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<form id="simForm" runat="server" method='post' action='https://test.authorize.net/gateway/transact.dll'>
<input id="HiddenValue" type="hidden" value="Initial Value" runat="server" />
<input type='hidden' runat="server" name='x_login' id='x_login' />
<input type='submit' runat="server" id='buttonLabel' />
Hello, I'm new to ASP.NET 3.5 with C#. I really need some help.
I used a Repeater control to create a simple (editable) list where, when a user logs in, they can edit their list of expenses. The ASP page works fine.
My issue is with the code-behind. I am really confused with how to extract the values from the repeater control. The FindControl method does not seem to be working. Also, the code I am using resets my 'Amount' values back to 0.00. (0.00 is the amount the user sees when they first encounter the page).
Here's a portion of the code on the ASP page:
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"
<td><asp:Label ID="lblExpId" runat="server" Text='<%# Bind("ExpId") %>'></asp:Label> </td>
<td><asp:Textbox ID="lblExpense" runat="server" Width= "190px" Text='<%# Bind("ExpenseName") %>'></asp:Textbox> </td>
<td><asp:Textbox ID="txtAmount" runat="server" Width= "100px"
Why do controls value not persist when returning to a page (e.g. via browser back button)? If I set control values without utilizing a post back the controls will maintain their last value when I return to the page. If I set a control value and then call a post back, the control value is reset to the default value when returning.
I have many pages with a gridview, and a textbox which is used to filter the gridview contents. I set the filter textbox, filter the gridview (postback), go to another page, and when I return to the gridview page (via back button), my filter textbox is reset empty, and the gridview is the original (unfiltered) data.
What concept am I missing here?
Thanks in advance...