Maintain State Of Textbox - ASP.NET?
Jan 23, 2009how to maintain state of textbox while postback
View 2 Replieshow to maintain state of textbox while postback
View 2 RepliesIf I have an event that starts a timer with an interval of say, 30 minutes, and 15 minutes later, the computer the app is running on sleeps (Suspend to RAM) or Hibernates (Suspend to Disk), and is brought back online after ten minutes, will the timer raise its Tick event in 5 minutes (30 minutes REAL time from the start) or 15 minutes (30 minutes RUNTIME from the start)?
View 1 Replieswhat is the diffrence between single call and single ton 2)is it possible to maintain state for every user whose requests not overwrite with another user..i mean i created one remoting application and client.i have one class created in remoting application and i am calling functions created in this call from client application.
View 3 RepliesPublic Class Form1
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
[Code]....
As you can see, when I enable/disable my checkbox it enables/disables my textbox.
The thing is, I have more than one textbox, how can i add more textboxes to be enabled/disabled?
I tried using If TextBox2.Enabled = True AND TextBox1.Enabled = True Then
TextBox2.Enabled = False And TextBox1.Enabled = False. (of course fails)
Using VB.Net, how can I save values from a textbox and checkbox when the application is closed? When the user opens the application again, the textbox and checkbox should be filled in with the same values as before.Do I have to save these values in a database, or what other options are there?
View 3 RepliesI need to create a program that when it is opened, Focus will be always in that program until someone with any way will close it. I've tried to add Me.GetFocus() in the LostFocus event but nothing happens, I've tried to add Me.activate() when the Deactivate() event raises and when I debugged the program worked but when I run the biulded .exe file nothing happens again! how I can manage this Function?
View 6 RepliesI have a table in Access with 3 fields Key (autonumber), Field1 (Text), LookUp1 (combobox).The combobox field is working off a list that I manually entered into it (there are only three options Opt1, Opt2, Opt3..When I import the datagridview control, the fields all come across as Text, and I lose that combobox option.Can someone tell me how I can maintain the format of the fields within Access when I import? [code]
View 7 RepliesI want to know that is it possible to convert exe file(made from vb2008) to vb source code..if it is possible then how can i maintain Privacy of my program.
View 2 RepliesHow do i maintain Security in VB.net Applications ? esp in databases
View 2 RepliesWell there are several ways that you can implement such a log. You could write to a text file or XML file...or you could use the Windows Event log.
What do you envision using for logging purposes?
I have a string variable called str assigned with "John". I changed it to "Dave" when the first button is clicked. When the second is clicked, I displayed the value to a label. I wanna see Dave but I just see John. Why is that?
There is nothing on page load and nothing else where. I know I can put into a session but this is on the same page. Can I not do without session or viewstate. [code]...
I am using vb.net code in which I am having a gridview control. Please see the below code
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" CssClass="innerGridTable" DataKeyNames="OrgID" DataSourceID="OrgGridViewDataSource">
<Columns>
<asp:CommandField ShowSelectButton="True" ButtonType="Button" SelectText="Select"
ControlStyle-CssClass="Button">
[Code]...
i just want to know how to maintain the position of an object w.r.t the window in vb when i resize the window during run-time.i tried anchoring it from all sides and the object resizes along with it.
View 6 RepliesI was wondering if there is a way to keep the same scroll position in a datagrid view as the app jumps around to various rows (driven by the user selecting different timestamps or address). After the jump happens, the horizontal slider moves all the way to the right, but I want it at the same position as before the jump (or at lease go all the way to the left).
I have tried numerous things (datatable.AcceptChanges(), etc) but haven't been able to figure it out yet.
Datatable contain some values like 0.0,10000.00,54678.94. I am getting that values using for loop and store it in a variable in double datatype. I want to add these nos and store it in a variable. Each time variable value changed.
for loop
Dim ds5 As dataset1.pro_dtsumDataTable = TA5.GetData(TextBox1.Text, users)
If (ds5.Rows.Count > 0) Then
Dim y As Double
y = Double.Parse(ds5(0)("sum(fld_primary)").ToString())
Dim y1 As Double
y1 = 0 + y
End If
Next
First time y1=0.0
Next time the value of y1 is not added to previous value.
I want the result y1=64679.34
I need to launch a mainframe login screen from a shortcut so that the target and start in paths are preserved.
Before I figured out that the 'target' and 'start in' paths were problematic I was calling the .exe from the server using the following code and then sending keystrokes to the mainframe login dialog:
Private Sub btnDB1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDB1.Click
Dim ProcID As Integer
[Code]...
...To launch the app from the shortcut, which works but I then can't call the process ID to set focus and send keystrokes to the login form.
I need a function in global.asax file which gets called only once when user enter a page url. application_beginrequest gets called 50-60 times in a single page( as to render a page several requests go to server.)
i though of a solution - I can write my fucntion in global.asax and call it on page load of other pages but in that solution I need to call it in every page. I would prefer something which is to be done only in global.asax
How to maintain Zeros in incremented values ex: ECJ-00001
[Code]...
I would like to maintain a list of all of the strings entered into a ComboBox across all uses of an application on a given PC, for use as the AutoCompleteSource for that ComboBox, i.e., I enter in "Fred" in the ComboBox, commit the data, close the application, reopen the application, reopen the ComboBox, type "F", receive the suggestion "Fred".Assuming I already have in place code to create and maintain such a list in memory and add new elements to it as they are entered into the ComboBox, etc., what do you suggest as the best way to save/load this data in between sessions?Possible complicating factors: This application will be deployed via OneClick deployment, and will search for updates online every time the application starts. I would prefer that if the application updates, the list still exists after the update has completed.
View 2 RepliesI use this code for maintaining aspect ration of form when resizing:
Public Class Form1
Public Structure Rect
Public left As Integer
Public top As Integer
Public right As Integer
Public bottom As Integer
[Code]...
I have had a look at 2010 to see if any options have been added to
System.StringSplitOptions
and we still have;
None
or
RemoveEmptyEntries
Anyway after answering another STRING related question here.>>
[URL]
I thought about how the String.Split method works.
Often I have wanted to split a string on the characters that terminate a sentence such as a full stop >> . << ,
a question mark >> ? << or an exclamation mark >> ! << and still keep the string split characters.
[Code]....
I am using Visaul Studio 2010 to build a Windows Forms application to maintain a table in an SQL Server 2008 database. The table is named CASHBOOK and here are the further details:
DATE | DESCRIPTION | DEBIT | CREDIT | BALANCE
--------|----------------|---------|-----------|---------
1/1/2011| CASH BALANCE | | | 5000
1/1/2011| SALES | 2500 | | 7500
2/1/2011| PURCHASE | | 3000 | 4500
2/1/2011| RENT | | 4000 | 500
2/1/2011| SALES | 5000 | | 5500
I can use CASHBOOKTABLEADAPTER.INSERT(...) to insert appropriately, but my problem is how do I update the BALANCE column?
I have the need to maintain a 4:3 aspect ratio on a Video control on a form. The forms (there could be up to 16 in a 4x4 layout) should all maintain a 4:3 aspect ratio when resized depending on clients monitor/resolution. The forms have a border and will keep them. The control is set to fill the form and is the only control on the form. Here is code that I use to create the initial layout:
[Code]...
I am developing FX software where Ticks are coming through socket and loading in listbox. but if i scroll down to see items its send back to me at top when new item add in listbox so what is way that scroll bar posstion remain at same where client want and its also keep add..
View 4 RepliesPublic Function MethodOne(ByVal s As String) As String[code]...
I want to retain the value of i, but once it goes back into MethodOne, it loses its value. I tried making it static i As integer = 0, but this did not work.
I want to take the following result with the help of query in Crystal Reports:I have a stock table where three column's "type", "product", and "quantity" now I want that to drag two sql expressions in my report 1st is "INN" and 2nd is "Out" and it comes like if the "type" is purchase so it check the "product" field and ADD the quantity and if the type is Sale it less the quantity according to "product" So what query should I write to get the result?
View 1 RepliesI am trying to strip the first 75 characters from various strings (sentences / phrases) and it seems right but I need to ensure that the now words are truncated in the process. Meaning that if the 75 character is part of a word it needs to fall back to the beginning of the word or nearest space..
I thought of stripping the entire string into separate words and then counting the length of combining the words and stopping when I reach the target but what do I do in the case when it is not a valid sentence just a bunch of characters jammed together. I thought of using grammar parsing tool libraries and parsing into tokens etc but that seems to over complicated.
if text.length() > 75 then
ctext = text.remove(text.length, 75) & "..."
endif
I put elipses at the end but using the above I also get the error:
does anyone have any better suggestions.
I am reading a field from my database that has line breaks in it and displaying it on an aspx page. I want to maintain the line breaks on the page. I believe this is more of a VB.NET issue than a DB problem. [URL]
So this is what I tried:
If IsDBNull(CourseHours.Value) Then
EventDesription.CourseHours = ""
EventDesription.CourseHours1 = ""
EventDesription.CourseHours2 = ""
EventDesription.CourseHours3 = ""
[Code] .....
I am pretty sure that CourseHours.Value contains the cr-lf's I am looking for. I attached a screen shot of my debugging session. When I query CourseHours.Value I see boxes or squares which I believe is signitying CR-LF. But my split is only ending up with one array element and it is a long string with all the course hours concatenated. What do I need to Split on?
using visual studio 2010. I have a vb.net application that needs to be updated periodically. The software stores client lists in a database for the user, but when the user reinstalls the program after I send them an updated publish, the client list database is replaced with a fresh empty database.
Is there a way that the user can reinstall the software without losing their current database?
I don't know if I need to somehow make separate publishes. One for an initial install to set up the database, and then one for updates that leaves the client database untouched? I don't know how to go about it.
i am making a website for trading, with trading feeds coming from a source in an excel sheet. I have to show data from the excel sheet in a gridview. When i make connection it will fail due to rapidly changing data; each cell in the sheet changes value 1-3 times per second. I am using an Ajax Timer of interval 100. Here is my code:
[Code]...