
handlewithbeer
Members-
Posts
15 -
Joined
-
Last visited
About handlewithbeer
- Birthday 02/10/1977
Personal Information
-
Visual Studio .NET Version
.net, vb6
handlewithbeer's Achievements
Newbie (1/14)
0
Reputation
-
hopefully someone can assist me with this. trying to make it so that when one div in my html page is hidden, another one is visible. tried this function hideShow(first,second) { var div1 = document.getElementById(first).style; var div2 = document.getElementById(second).style; div1.display = div1.display? "block":""; div2.display = div2.display? "":"block"; } not sure how to proceed. any help greatly appreciated. thanks.
-
ok, me thinks i understand it better now. thanks so much!
-
try this? <body MS_POSITIONING="FlowLayout" onkeydown="if(event.keyCode == 13){return false;}"> it sez, if the user hits enter on the page, then do nothing. good: keeps people from submitting by mistake bad: cannot do carriage return in a multiline textbox, nor use the enter key for button click events cheers!
-
situation: Asp.net webUserControl with dropdowns, textboxes, and a datagrid. Using the ddls and txt to have a user specify certain attributes (country, product name, etc), and then populating a datagrid with the desired results. problem: Once the grid is filled with records, and a record is clicked (hyperlink column) the page posts back. The datagrid is no longer visible (possible: databindings are cleared on postback???) and the textboxes and ddl's above no longer have their original information in them. required: be able to click on a datagrid item and have that items details displayed on the page. also, to NOT have the ddl's and textboxes cleared, so as to allow a user to quickly change one of the values in a ddl for example, and to re-do the search. also required: the results not be displayed on a separate details page, as the sorting page with the datagrid will still lose the information. attempted to find: a solution online that would use some sort of javascript, so as to avoid the postback problem. also, attempted to have the dataNavigateURLFormatString post back to a) a user control (nope) or b) use the target = _self attrib. I thank all for their time in advance, and look forward to any assistance. also, for additional incentive, I could send you an action filled picture of me drinking coffee. Holy caffeine fueled coding, Batman!!!
-
hey, thanks for the reply! however, I'm not quite sure how I would use your example. by having a hidden field, will that still not be client side? example. In my vb codebehind, I did this dim strTest as string = lblTest.InnerText.toString. setting a breakpoint, I could not "see" the text in the label. I am guessing that when any postback occurs, the value is cleared from the control. Therefore, I was wondering if coding anything in the HTML will matter, as it still cannot be "seen" on the server side. Hopefully, I am not being too dense, and as with all problems like this, it will most likely end up being a real forehead smacker once I see the light. again, thanks for the help. handleWithBeer.
-
hoping someone can point me in the right direction. I have some javascript dropdowns on a form, and want to pass the selected values of those ddl's to the server. so, I set a non-asp label to equal the values of both dropdowns. I now want to get that string, and pass it to the server. the problem is, anything on the client side will obviously not be "seen" server side, and that includes the code behind in my app. here's the function code on the html view function showItems() { var country = document.Form1.selCountry.value; var province = document.Form1.selProv.value; if ((country == '0') || (province == 'C0')) { alert('required! country and/or province'); } else { var myString = document.Form1.selCountry.value + ' ' + document.Form1.selProv.value; lblTest.innerText = myString; } } the label on the page will successfully show the values from the dropdown list, or select as javascript calls it, but I need that string to be passed to the server, ie, in my VB codebehind, I need to access the "text" of the label. how can I do this? any assistance appreciated!
-
That is kinda working, but still a bit buggy. Take a look. Dim lineCount As Integer 'number of lines in the textbox lineCount = (txtOrderItems.Height / myFont.Height) - 1 'firstArray initialized to hold the textBox contents Dim firstArray() As String firstArray = txtOrderItems.Lines 'if there are more lines past the bottom of the TextBox, get a cutoff point Dim breakOff As Integer = firstArray.GetUpperBound(0) - lineCount 'Now What? This is where I need assistance. Dim secondArray() As String secondArray = ?? OK, so you see the problem, and I'm just not sure how to copy, in laymens terms, from starting point X all the way to the end
-
UnhandledException / ThreadException not working
handlewithbeer replied to kasdoffe's topic in Windows Forms
Could it be that you're not specifically trying (no pun) to catch a NullRefEx? So the catch is not caught? (sorry, more puns) -
Will a newly instantiated textbox actually contain the text that was in it, or just the properties of the object itself? If I am reading this correctly, maybe try to save the text from the box in a .txt file, then instatiate the new textBox object, then add the saved text to the new textBox.
-
I have a textbox with several order items in it. To determine the number of lines, I divided the height with the font size. Cool. Now, to get the total number of lines of text, I used a string array, set it to the textbox, and used stringArray.getUpperbound(0). Cooler. now for the question. If the number of total lines of text (ie order items) is greater than the amount of lines the textbox can hold (ie what the user would see) how can I add the remaining lines of text to another array, and print that off. I know it sounds a bit confusing, but any help would be appreciated. thanks, H.W.B.
-
Hi there, Have a mojor problem trying to do the following: Create a new instance of a ms-word(2003) document and open in from my web form -or- open an existing template through the web form. I've gotten security and access errors, even when just declaring something as a new word.document or .application (ie: Dim aDoc as new Word.Document)! I have referenced all sorts of office dll's, and have fiddled with my security and IIS settings to no avail. I am running winXP Pro, using VS.Net pro with .NET 1.1, and office 2003. Any help would be greatly appreciated. Thanks in advance.
-
So you're saying that it no longer flies to get an item from a database (old school would look like txtName=rs!fldName or whatever), and I need to specify a type that will be read from the database? Or can I get the dataReader object to get information without specifying the type?
-
Sorry, The problem is that it's telling me that the data/record does not exits, even though I put some data in the dBase manually for testing. I guess my biggest problem is getting my head around the new syntax, such as the recordset obj not being used anymore. Thanks again.
-
The code I'm using to try(emphasis on try) and connect to access. Dim MyConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\ata\60feet\60feet.mdb") MyConnection.Open() MsgBox(MyConnection.State) Dim MyCommand As New OleDbCommand("select * from suppliers", MyConnection) Dim MyReader As OleDbDataReader = MyCommand.ExecuteReader() MyReader.GetData() MsgBox("Supplier id is " & MyReader("SupplierID")) MyConnection.Close() MyReader.Close() MyCommand.Dispose() Thanks again.
-
I am new to dotNet. I need help with accessing an Access database. In the times of vb6, I'd use the adodb .Recordset and .Connection objects. How can I do the same with the ADO.Net objects. I know I need to Import system.data.oledb and system.data in the GenDec section. So what is the new thing for recordsets? and any code examples would be really, REALLY appreciated. Thanks in advance, HandleWithBeer (aka the Beer Baron :))