- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 7
- Posts with Upvotes
- 7
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
34 Posted Topics
Re: I really do not know what you are doing with that messed up code???? Now look at my code then look at your code. My code works yours doesn't! var toppings = prompt("What would you like on your pizza?"); if (toppings == 'chocolate' ) { prompt('you want chocolate on your … | |
Re: So is markers an array? If it is I would check marker varable also look at this link to make sure you have the parameter right http://www.w3schools.com/jsref/jsref_push.asp | |
Re: Here this should help, so anyway you can see I have a link. Then in my javascript I get the id to the link and tie an event listener to it. When it is clicked it will fire the myFunction. I hope this helps. <a id="myTest" href="">This is a test</a> … | |
Re: It looks like you are calling Read() two times. [code] Dim dr2 As SqlDataReader = Nothing dr2 = mycommand.ExecuteReader() [COLOR="red"]dr2.Read()[/COLOR] While [COLOR="red"]dr2.Read()[/COLOR] productDescription = Convert.ToString(dr2("Long_description")) End While [/code] Edit: When I call data I always check to see if my reader has rows before I use it. Here is how … | |
Re: Yes when one updatepanel fires then all updatepanels on the page will also fire. You need to set the updatepanel UpDateMode to Conditional <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"> Read [url]http://msdn.microsoft.com/en-us/library/bb386454.aspx[/url] [url]http://msdn.microsoft.com/en-us/magazine/cc163413.aspx[/url] Edit: Sorry I see that svilla has already answer this. By the way in the first link I show it … | |
Re: khadakbist showed you how to do it. All you need to do is make a check to see if you have a query string. So lets say they are going to be using a name like "myString" [code] http://www.xyz.com?myString=This_is_the_Information [/code] Do something like this. [code] string myCheck = request.querystring["myString"].ToString(); if … | |
Re: I tested Airshow example and it works good. You need to find out why the document.getElementById is not returning the object "reasonTable" | |
Re: Well "this.Controls.Add(uxTimerImage);" does add it to the page but it is outside of the body. Try the code below I tested it and it works. You just need to remember that when you add a control it needs to be a child of the form or body. Also you only … | |
Re: In the second buttons click event you would set the two textboxes to a empty string. textBox1 = ""; textBox2 = ""; | |
Re: Yelp CrappyCoder is right, the viewstate is going to load anyway. But if you are going to move to another page or just want to use sessions anyway. I put it in a button click event. [code] protected void Button1_Click(object sender, EventArgs e) { if (Session["userPassWord"] == null) Session["userPassWord"] = … | |
Re: Thats weird behavior, I created a list box and added 100 items to it. I just use a default listbox. I then clicked a button control to do a postback and the selected item was still selected and was at the top. I then set my listbox height to 150px … | |
Re: I think you are going to have to use client side javascript to disable the button. In the head of your page put this javascript [code] <script type="text/javascript"> function disable() { document.getElementById("Button1").disabled = "true"; } </script> [/code] and for your dropdownlist control use this [code] <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="PopulateState" … | |
![]() | Re: Since no one else has answered your question I will tell you how I would do this. I would not use a session variable. Instead I would use straight javascript, its cleaner. I would put [B]Address line 2[/B] and [B]Adress Line 3[/B] in thier own div tags and set the … ![]() |
Re: Thats because the dropdownlist is repopulating on postback. What you are going to have to do is populate the dropdownlist from the code behind page within a if (!IsPostBack) This way it will not repopulate on postback. | |
Re: While shine's method is good and will work fine. He is using the server side code to validate the textbox. There is another way, you can validate on the client side instead. Below you will see I am using the requiredfieldvalidator. On my apps I alway place a red star … | |
Re: I would go to the source Microsoft. MSDN has lots of tutorial and videos. MSDN is a big place and is not the easiest to move around in but there is a lot of infor for free there. [url]http://msdn.microsoft.com/en-us/bb188199.aspx[/url] [url]http://msdn.microsoft.com/en-us/beginner/default.aspx[/url] | |
Re: [QUOTE=subhankar02dey;1306306]I am using dropdownlistname.items.add("select","0") and dropdownlistname.items.insert("select","0") [/QUOTE] Try this dropdownlistname.Items.Insert(0, "<-- Select -->"); | |
Re: When you say subroutine I take it you are using VB. I droped vb years ago in favor of C#. So in C# I can and do call a method in one class that will call a method in another class. They say what you can do in one you … | |
Re: A datareader runs one way, it is fast and very good for printing out info. So with your if(dr.Read()) if the datareader has rows then this code will print out the first row of data to your variables. btw: It is good pratice to check to see if the reader … | |
Re: Wow no breaks and no tables. LOL But yes when you use absolute thats what you get. I am not that good with css either but I think you need to use "position: relative;" and start a new row with a div tag. This way you are telling it to … | |
Re: I don't think you can get out of the box (Browser window). I believe that for securely reasons you can't track any of the keyboard clicks through a browser. | |
Re: I maybe wrong here but I don't think you can do that on the server side, you would have to do it on the clent side with javascript. The problem is you don't know what size the clents screen is and you don't know when they resize it or to … | |
Re: The Try Catch Finally is a way to handle errors in a good way. :) When you are running a pice of code you ask it to TRY if everything works as it should then the code is ran then the FINALLY statement at the end runs. This is where … | |
Re: One is a loop and the other one is not. A While loop will always run at lease one time. Where a IF statement is true or false, if true then do this, if not then don't. Hope this helps | |
Re: You do know html and css don't you? If not then you should read some tutorials on them. Do your page base layout, you can use div tags or a table. Then with css add your colors, width, height, and so on. Like if you want a nav bar that … | |
Re: I tested this and it works for me. [code] protected void Page_Load(object sender, EventArgs e) { Button myButton = new Button(); myButton.ID = "test"; myButton.Text = "MyButton"; myButton.Click += new EventHandler(Button1_Click); form1.Controls.Add(myButton); } protected void Button1_Click(object sender, EventArgs e) { Label1.Text = "It works!!!"; } [/code] | |
Re: Are you thinking a postback? If so a postback is posting back to the same page with a web form to run a method or someother function that is on the page. Back in the old vbscript days we would post to another page to do something then move to … | |
Re: Well did you write any code yet? If I understand you right, you want to populate a dropdownlist from a database. Then you want to remove the selected item from the dropdownlist on a button click. You also want a dialog box to show before the removal of the selected … | |
Re: I am guessing you are storing the sessionID in the database for that account? If so then who cares if they leave your site and come back or if they close their browser and re-opens it. The idea is to only allow the user one session while on the site. … | |
Re: I seen this thread a few days ago and wanted to answer it but didn't have the time. While the answer you got is very good there are other ways of doing this. One of the ways is using a generic list and generics is something that you should learn. … | |
Re: First I would never put my textbox in my sql statement like that, you are asking for trouble. Next why are you doing a while statement when you should only be returning one row? If you dont return a row then the name and password didn't match anything in the … | |
Re: I know this is a 4 day old thread but I have never seen a check for (Page.IsPostBack) in a button_click event. I thought that you could only check for a postback in the Page_Load Event. Am I wrong in thinking this? | |
Re: I am not the best to answer this but I don't think you can call a method from another page. But you can get the value from the textbox from a previous. So if the value you need is in TextBox1 on the previous page you can try this. [code] … | |
Re: I don't think anyone is going to be able to answer your question without more information. But rounded corners is a hot topic, as for me I tryed images. But some of the problem with images is tranparenty, banwidth, wanting to change color layout later. I tryed images and it … |
The End.