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......
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?
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
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
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?
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.
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
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
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.
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>.
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?
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)
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.
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.
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'..
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)