Data Controls :: How To Modify Static Variable At Runtime To Pass Data From One Form To Another
Apr 16, 2014
I have using Static Variable in My project.i want Change Static variable value because of transfer the value b/w two Forums... and I want Change value at run time...provide solution
Or else Any other way transfer value b/w two forms......
View 1 Replies
Similar Messages:
Feb 22, 2011
I have defined a public static HashTable. It stores data for a few seconds of runtime, and then data disappears, and then the HashTable becomes null.What is the issue and how do I solve it?
View 1 Replies
May 18, 2010
I want to pass the string input from a text boxe in Form1 to appear in a specfic textbox field in form2.
I'm trying to do it via HyperLink in the source form:
NavigateUrl="~/PassVarTest.aspx?txtFirstName"
and this code in the destination form:
[Code]....
View 4 Replies
Feb 28, 2010
public static int _CompanyId;
I am assigning some value to _CompanyId after login .After some post backs i lose value in_CompanyId .What could be the reason ?
View 4 Replies
Mar 13, 2014
How can I Change Password in windows here we don't have Sessions... In update query we need use the Sessions .....
View 1 Replies
Jan 15, 2010
I query the database to get the VideoName and VideoURL of the videos held in my database (Videos saved on the file system with their location stored in the database) then bind the query results to a repeater with the following code
protected void Page_Load(object sender, EventArgs e)
{
// Variables declaration
string strConnString = ConfigurationManager.ConnectionStrings["vidConnectionString"].ConnectionString;
SqlConnection sqlConn = new SqlConnection(strConnString);
SqlCommand sqlcmd = new SqlCommand("SELECT [VideoName], [VideoURL] FROM [Video]");
SqlDataReader sqlReader;
sqlConn.Open();
sqlcmd.Connection = sqlConn;
sqlReader = sqlcmd.ExecuteReader();
VideoRepeater.DataSource = sqlReader;
VideoRepeater.DataBind();
sqlConn.Close();
}
and put a hyperlink into the repeater to list all the VideoName's this works fine but I want to pass the VideoURL to the next page I am using NavigateUrl="PlayVideo.aspx?VideoURL='<%# Eval("VideoURL") %>'" but when I try and load the Page I get the error saying The server tag is not well formed. the whole repeater code is
<asp:Repeater ID="VideoRepeater" runat="server" >
<ItemTemplate>
<asp:HyperLink ID="VideoLink" NavigateUrl="PlayVideo.aspx?VideoURL='<%# Eval("VideoURL") %>'" runat="server"><%# Eval("VideoName") %></asp:HyperLink>
</br>
</ItemTemplate>
</asp:Repeater>
I'm sure i've just got the hyperlink navigateURL wrong put not sure how else to pass the VideoURL variable
View 9 Replies
Aug 20, 2010
I have a page in my website where there is very little code-behind. I only have two lines of code in Page_Load() and the rest of the code is declarative ASP.NET code. I have a FormView control which uses a SqlDataSource to get some order information. The SqlDataSource calls a stored procedure called usp_GetOrderDetails, here's the code for the SqlDataSource:
[Code]....
<truncated>
What I want is to grab the screenshotId from the SqlDataSource when the usp_GetOrderDetails stored proc gets called and populate it into a field on the page called screenshotId. I then want to use this screenshotId to get an image from the database based on Id. populating the screenshotId field. How do I do this - do I need to have something like OnDataBound or something like that?
View 4 Replies
Aug 3, 2010
For example:
<asp:HyperLinkField Text="Edit" NavigateUrl="EditPage.aspx?var1=Variable1&var2=Variable2" />
I realize this can't be done through the page's mark up, at least I think this is so, but if someone could explain the easiest way the concept could work I'd be very appreciative. Basically, I just need a user to be redirected to a page with more than one variable in the url. If you are unclear with what I'm asking don't hesitate to ask me to explain a little better.
View 2 Replies
Jan 14, 2010
I'm trying to pass a value (address) from a listview control using visual basic to a google map address control on the page load event. Here is the code I have so far in vb:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Pass address from Listview to Googlemap address
GoogleMap1.Address = ???
GoogleMap1.Zoom = "14"
GoogleMap1.ShowScaleControl = True
GoogleMap1.EnableInfoWindow = True
[Code]....
View 3 Replies
Nov 6, 2013
i have a gridview with link button and one field called "ID" i have five values....when i click the link button that row value ill show in next page in textboxes ,txtid, txtage, txtsalary,......... if i click that link button that "Id" values should pass to next page using "SESSION" variable in C#.net
View 1 Replies
Mar 3, 2011
I am trying to use this query in a form view "Select * from actions where emp_id = " & session("emp_id") for the select command. This is the format I am used to in classic asp. How can I acheive the same results in asp.net.
View 2 Replies
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
Nov 26, 2010
I cannot pass the result data of jQuery.post() to a variable. The result is undefined. [:(]
[Code]....
View 6 Replies
Jan 27, 2011
I have a question about C Sharp ASP.NET:Is there a difference (in code speed, resources) between:public static variable declared in public static class MyGlobals in a 'Code File' template;and the variable declared in a normal 'Class File' template;I use this variable in 2 different Class Files and also in _Default Page codebehind cs file.In fact in my case I need about 20 global variables of type List<string>.
View 9 Replies
Mar 20, 2011
I searched on this all morning, but I'm still not sure. If I create a session variable to pass some data between a couple of pages, does that variable time out after it reaches the timeout period set on IIS, or will it persist for the entire time the user keeps a session alive? For example, session variable is used shortly after login and then never again. Susy uses other pages for two hours and keeps session active. Did that first session variable die after 20 minutes, or is it still there 2 hours later?
View 4 Replies
Mar 18, 2010
Im having a hard time making ends meet with cenerio.
I have a daily task database that stores the
date, project number, start time, end time and total time
One date could have multiple entries.
I'm trying to link my data to a calender so when I pick a date all the daily tasks are pulled into a gridview.
Also I want the calendar to pull up a blank form where I can input all that info in if the date has no entries.
View 4 Replies
Feb 26, 2013
How to fetch, insert, delete and modify the data in gridview...
View 1 Replies
Apr 16, 2010
Assume the following html form is on [URL]in which you enter first name and last name and click the button.
<body>
<form id="form1" action="Result1.aspx" method="post" >
<p>
First Name:
<input id="FName" type="text" name="FName" /></p>
<p>
Last Name:
<input id="LName" type="text" name="LName" />
<input id="Submit1" type="submit" name="submit" value="submit" /></p>
</form>
</body>
The form1 posts data and you will see the Result on [URL] which simply shows your data.
<body>
<form id="form1" runat="server">
<div>
Result is:<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
Here is a sample code for the result page: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim SB As New StringBuilder()
Dim NVC As NameValueCollection = Request.Form
Dim nextKey As String
For counter As Integer = 0 To NVC.AllKeys.Length - 1
nextKey = NVC.AllKeys(counter)
[Code.....]
View 8 Replies
Feb 20, 2010
I have a gridview that displays data from my online database. Works great. edit/update/delete functions work also.
I decided to import data into my database through my SQL Server web admin. It worked fine, and the imported data now shows up in my gridview, but once I decide to use my gridview edit/delete buttons, the grid won't update the data or delete the rows. It will however properly function on the rows that were manually entered with the gridview and/or in visual studio.
View 2 Replies
Sep 19, 2010
As in asp.net I can change or modify the design of my web page about it being online and that these changes are saved permanently afectondo the page source.
View 2 Replies
Aug 4, 2010
I am using a from view for data entry. I need to verify that a check box is true or false after editing a record.
I have been accessing label text using the following|
CType(FormView1.FindControl("RespDeptLabel"), Label).Text
How can I access the state of a checkbox in the form view to determine if it is true or false
View 4 Replies
Sep 16, 2010
i am using oracle 10g... m showing some data for a particular record on my page.. i have some fields where i have to mention thr units like 'metre' or 'kg' as in my database those fields are numeric so can't make change directly in database.. so is thr any other solution so that i can display those fields with thr proper units at runtime like 'depth= 100 m'..
View 6 Replies
Oct 25, 2013
How to save data in tables without any button click , it should be done at the time of entering data in textbox and before goin to next data.
View 1 Replies
Mar 16, 2011
[Code]....
}
[Code]....
View 3 Replies
Jan 28, 2010
Would anyone know how to pass a variable to SqlDataAdapter. Here is my code.
TextBox1.Text = 1
Dim textboxval
As
String
textboxval = TextBox1.Text
connection.Open()Using connection
As
New SqlConnection("Data Source=CHRIS-PCSQLEXPRESS;Initial Catalog=TorGHL;Integrated Security=True")
Dim dapubcb
As
New SqlDataAdapter("SELECT [BarName], [MenuSubId], [Address], [PhoneNo], [BarURL], [Email]
[BarDescription], [Id], [bg_long], [bg_lat] FROM [BarDetails] WHERE [MenuSubId] = texboxval ", connection)
View 5 Replies