Jump to content
Xtreme .Net Talk

ttkalec1

Members
  • Posts

    19
  • Joined

  • Last visited

ttkalec1's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I figured out what was the cause of my problem. I haven't properly build my application before deploying it to my a website.
  2. I have this situation. I wrote some code and it works just fine when I run it locally on my Visual Studio server, but when I send it to my web site, it doesn't work. The code looks like this: Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ListBox1.SelectedIndexChanged ListBox2.Items.Clear() If ListBox1.SelectedItem.Text = "ab" Then ListBox2.Items.Add("aaaabbb") ListBox2.Items.Add("aaacccc") ListBox2.Items.Add("aaadddd") End If End Sub It's pretty simple. it populates a second listbox with some values when I click on an item in listbox1. AutoPostBack is set to True on my listboxes and I have enabled ViewStates for my listboxes. ListBox1 comes with predefined items, but when I click on of that items nothing happens if I run it on my website. What could be the problem?
  3. OK, I managed to find out how to configure my SQL server and application to store my session objects... tnx alot for your answer ;)
  4. The code is exactly the same. I don't know where I'm storing my sessions. Probably InProc cause I didn't configure it otherwise. How do I configure it to be stored in SQLServer or StateServer? Does Session_start gets executed if it's configured to be stored InProc?
  5. I have this simple code to execute an SQL query Dim PretragaAdapter As New mysite.DataSet1Adapters.PRETRAGATableAdapter() PretragaAdapter.DeletePoDatumu() It deletes some rows from a table. When I put this command in a button everything works just fine, and rows get deleted. But I want to put it in Global.asax file in Session_end section, so everytime an session ends, this command gets executed The problem is that this command doesn't work in Session_end event. I know a session lasts for about 20min, but after couple hours I still don't see any changes in my database.:confused:
  6. Thank you for your answer :)
  7. Tnx Nate ;) I will try that
  8. I found out the solution to my problem and It's really simple :D I need to have one label control and just put a text like this in it: label1.text = "Some text <br /> tekst in new line" and that solves my problem ;)
  9. Hi, I have an (I think) easy question. I have a situation where i have an array of strings like Dim Names as string() and this array doesn't always have the same number of strings in it. My problem is that i have to print that strings on to my aspx page but I obviously can't use label controls on my aspx form for this, cause I don't know how much strings will I have, so I can't populate my labels. I need to print these names in a list like this: Peter Bob Michael So, what control to use for this or how to print these names one below the other?
  10. Hi, I don't understand how relationships and constraints in a database work... Actually, I just wanna know if this is possible: I have two tables: 1. contains a primary key, and the 2. contains foreign key that is linked to the first one. It looks like this: 1.table ID Name Year 2.table ID Description Is it possible to delete a record in first table (which contains primary key), and then, because of their relationship, rows in the second table containing ID (foreign key) be deleted? Or do I need to do it all programatically Btw. I'm using Microsoft SQL Server 2005 Express
  11. Hi! It's me again. I figured out how to do what I wanted. long story short, this is how I've done it: Dim lblID As New Control lblID = FormView1.Controls.Item(0).FindControl("ImeLabel") lblID.Visible = False in the code behind you declare new control, then you have to find the control that you are looking yoru in your FormView. When you find it than you can work with it ;)
  12. I've created an FormView template that collects records from an SQL database. And I've stated that my FormView is pagable. Now my question is, how do I save a text from an label inside that FormView items to a string in a code behind? The problem is that in code behind I cannot see the label objects inside that FormView. I can see FormView object itself. So I'm not shure if I can via FormView object, see a collection of objects inside it and manipulate with them in runtime like this: FormView1.Items.lblName.text = "some other text" This of course isn't the right syntax, but I was wondering if there is something like this that I can use? For example: I have an record that shows ID, Name and Age and it shows in labels on my FormView object. Now i want to make a button on that form view, and when I click it, I want it to pass the Name label.text to an string inside my code behind. Is this possible? I think it is, cause it wouldn't make sense if it isn't?
  13. Sry guys for the post, I figured it out :D if someone is interested how I've done it, here is the link ;) http://www.xtremedotnettalk.com/showthread.php?t=91196&highlight=forms+authentication
  14. Hi, I have build a site that relies on forms authentication and this is how my web.config looks like: <system.web> <customErrors mode="Off"></customErrors> <authentication mode="Forms"> <forms name ="hosteseAuth" path="/" loginUrl="login.aspx" protection="All" timeout="30"> <credentials passwordFormat="Clear"> <user name="jeff" password="test" /> <user name="mike" password="test" /> </credentials> </forms> </authentication> <authorization> <deny users="?" /> </authorization> it all works just fine, but I don't understand where do I specify what pages of my site I want to require to login. Example: I want to specify that default.aspx and every other page can be viewed by anyone, only the admin.aspx site requires login. With the code above, login is requiered when I try to get on any page, even default.aspx. I've searched the forum, and haven't found any example that would help me. Is implementing roles the key? How do I do that?
  15. O, thank you, I'll take a look at it ;) Just one quick question... I have installed AJAX toolkit to my computer, but do I have to install anything to my server machine that will run AJAX powered page?
×
×
  • Create New...