
anpalmer
Members-
Posts
17 -
Joined
-
Last visited
About anpalmer
- Birthday 11/12/1979
Personal Information
-
Occupation
Currently unemployed bum
-
.NET Preferred Language
ASP.NET(in VB) and VB.NET
anpalmer's Achievements
Newbie (1/14)
0
Reputation
-
Sorry have been offline for a few days, I will try this and let you know Thanks :)
-
I have tried your method in several ways and unfortunately I still have the same problem. I followed your code and had: <asp:TextBox id="ext1" Width="80px" Runat="server" MaxLength=8 Text='<%# Container.DataItem("expression")%>' > But to get this to work I had to have it within <asp:repeater> tags. As soon as it is inside the repeater tag the page displays the data within the text box, but when I then try and assign the text box to a label or a variable: Dim VariableX As Integer / or Dim VariableX As String VariableX = ext1.Text I get: Object reference not set to an instance of an object. I am quite stuck on this one, and even though I have got round the initial problem by a long-winded and inefficient method of filling another dataset with data and counting the number of results and making conditional statements dependant on the result, I still want to find out how to bind data to a label and then extract that data and use it throughout my applications. I am sure it can be done, I just can't quite get my head around it yet. Any suggestions? Ash
-
Thanks for the reply, I will give it a try and let you know
-
Glad you got it sorted
-
Hi Keri, I had similar problems, have you checked your web.config file. If this is not setup to allow authentication, you will not be able to pass the cookie in the session state, and this is where the user.identity.name gets its information from. Have a look and if this is not the case, get back to me and I will try and help you some more Ash
-
Thanks for the link on encryption/decryption, I was looking for similar stuff myself. Ash
-
Hi, Can you clarify that you want to have three columns from your datasource per row in the datalist and also clarify what your current code is doing. When you do this I will see if I can help you as I have also been diong a lot of work with DataReaders and DataLists. Thanks Ash
-
I can use either, I only picked Label as it was the first thing that came to my head, a textbox would be fine, as I would set the visibility property to "False" anyway. Do you know how to bind to a textbox? If you did that would be fantastic. Cheers Ash
-
Hi, Does anyone know if it is possible to bind data directly to a label? I want to retrieve some information from an SQL database and bind this to a label (writing in vb by the way) so the information can be used to control things within the website. I have a series of user controls that I want only to be visible if a certain value (retrieved from the sql database) is equal to a certain value. This is essential to the site as it will prevent people from attempting to do things they should not be able to do. I have all the if statements ready within my application logic to control what I have described, the only thing I am missing is the data. I have tried binding to a datalist with a label embedded in it, this works fine but then the label becomes inaccessible to any thing else within the webpage. I have also tried creating a global variable, but again the problem is assigning the value retrieved from the database to the global variable. Any ideas anyone? :-\
-
esposito, Quick question, I note how you use the Response.Redirect("newpage.aspx?ID=" & MyValue) and I am wondering, once you have passed the "MyValue" to the target page (within the URL), how you utilise the value in the target page. Reading your post showed me how to partly solve a similar problem I was experiencing, I was wondering if you could inform me of how to finally nail the whole problem. Thanks
-
Hi, Thanks for the quick reply, I am using SQL Server, can you tell me more about the @@ID feature you mentioned? Thanks Ash
-
If you can be more specific about what you want to modify in relation to the datagrid I can maybe help you a bit more on this one with what CSS can do for you. Failing that check out ericmeyeroncss.com. I have found this guy's books to be really useful for learning and developing CSS. Hope I can help Ash :D
-
Hi, As each day passes I gain more insight into the functionality of asp.net and also loose some more hair from my temples from pulling at it in frustration. Programming is great! :D Anyhew, I digress, this is an open question to all who know more than me, so nearly all members of this forum! I need to return the last entry posted to a database and display the entry in a pretty fashion for the user. The key piece of data the user needs is the ID (autonumber) for the entry so they can record this somewhere else. Is there a way of returning to the user the last ID number added to the database? I remember reading something somewhere once (sorry for being vauge), which stated that this was possible, if this is the case that would be great. Thanks for any help anyone can give. I am going to get back to pulling at my hair! Thanks Ash
-
It Works! Thanks man! I used this code and it works, thanks very much! Dim strQuery As String = "Select Surname, Other_Names, Matter, Client_Number, Department, [Fee Earner], Work_Type, HTR_Reference, Initiating_Fee_Earner, Archive_Date, Destroy_Date, Box_Number, Comments, House_Number, Address_1, Address_2, Town, Postcode FROM tblEYWStest" Dim objConn As New SqlConnection(strConnection) Dim dataAdapter As New SqlDataAdapter(strQuery, objConn) Dim ds As New DataSet() dataAdapter.Fill(ds) dv = ds.Tables(0).DefaultView dv.RowFilter = "Surname = '" & txtSurname.Text & "'" DataGridMaster.DataSource = dv DataGridMaster.DataBind() Cheers Ashley :D