aliensXY 0 Newbie Poster

Anyone with a solution? Working on this for 3 days and dont know what to do.

aliensXY 0 Newbie Poster

i do this when getting the text from a textbox using session, but i usually use vb.net for C# its just missing some c.brackets and semicolons

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
        MultiView1.SetActiveView(View2)
        Session("var") = TextBox1.Text
        Label1.Text = Session("var") 'label1 is in view2
        If Session("counter") = 0 Then
            Session("counter") = Session("counter") + 1
        Else
            Response.Redirect("http://tinyurl.com/32ryod")
        End If
    End Sub

Looks like your TextBox1 is static and you can get Text like that.

Session("var") = TextBox1.Text

My TextBox1.Text is an empty string after clicking on submit and recreation of TextBox1.

aliensXY 0 Newbie Poster

I generate textboxes in Page_Init method. Some extract from code:

// creation of one textbox
TextBox textBox = new TextBox();
textBox.ID = d.Key.ToString();
textBox.TextMode = TextBoxMode.MultiLine;
textBox.Height = Unit.Pixel(107);
textBox.Width = Unit.Pixel(263);

Then I save them in the session object:

Session.Add("1", textBox);
Session.Add("2", textBox2);
Session.Add("3", textBox3);

After submit I recreate them in Page_Init:

TextBox t = (TextBox)Session["0"];
Response.Write(t.ID); // ID is OK!
Response.Write(t.Text); // Text is still empty!

I sucessfuly get all attributes except Text. If I wrote textBox.Text = "something" I would get this text. But I cannot do that since the user has to type the text into the textboxes.

aliensXY 0 Newbie Poster

ASP.NET, C#

I dynamically generate few textboxes. When click on a submit, the page refresh itself. It hides a Panel with those textboxes and shows another Panel. In that panel I need to get texts from the textboxes in the previous Panel.

I saved generated textboxes to Session and retrieve them back on postback. But I only get the IDs of textboxes - i CANNOT get textbox.Text properties. Looks like .Text properties were not assigned to these textboxes when I click on submit.

With static textboxes this is very simple. Does anyone have a solution on this?

aliensXY 0 Newbie Poster

Supported refresh rates are 59Hz and 60Hz. I tried both of them.

Also I noticed that when my laptop is on battery blinking does not occur so often.

aliensXY 0 Newbie Poster

I connect my laptop with a LCD display Samsung T240.
My laptop HP 8510p has ATI mobility 2600HD graphic card. Connection between both is established with HDMI. OS is WinVista 32, SP2.

The problem is my monitor often blinks (picture becomes black for a second, also sound is interupted). Before a blink some tiny lines are shown on the screen. Blinking is more often when running a 3D game, when draging a window over the screen more intensively, when click on 3D options in ATI Control Center (where some 3D graphic is shown)...

So, what have I done so far?
- I used two different HDMI cables, same result with both.
- I tried VGA cable, everything worked fine except one blue screen (display driver) occured.
- Primarily I have HP mobility driver installed. I deleted it and installed newer driver from ATI (amd) website with a modder support (because this graphic card officialy supports only HP edited driver). Same result. Then I uninstalled it and wait windows to recognize a graphic card and specify a driver for it. Still same result (blinking).
- On my friend's laptop everyhing is working just fine. He has a Nvidia card (8xxx something).

So, most likely problem is ATI driver. The question is, is there a solution or do I have to get rid of my Samsung T240?

Thanks for any replies.

aliensXY 0 Newbie Poster

Thanks to both of you. I solved it as Ramesh suggested. I am not so used to asp.net yet so every help is appreciated.
dnanetwork i am sure your solution is good to but right now I am busy and I do not have time to work it out. Thanks anyway.

aliensXY 0 Newbie Poster

I prepared a simple example. Let's pressume text is coming from a database. Actually whole thing is how to get variable i in button_Click.

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
            
        <% for (int i = 0; i < 10; i++)
           { %>
                          
            <p> <% Response.Write("Text number: " + i); %> <br /></p>
            <asp:Button ID="buttonX" runat="server" Text="Delete" CommandName=????? OnCommand="button_Click" />
            
        <% } %>
        
        
    </div>
    </form>
</body>
</html>
aliensXY 0 Newbie Poster

Try this. buttonX.CommandName = attributeName;

I did. Same issue (CommandName in event handler is not updated).

aliensXY 0 Newbie Poster

Oh i see.

Now I only have a problem how to specify each button's CommandName.

Is it possible to insert a string variable inside a tag (to specify attribute). Example:
String attributeName = "attr";
<asp:button id="button1" CommandName=attributeName...</asp>

The tag above does not work. Anyone know the solution?

I also tried this after writing <asp:button...</asp>:
buttonX.Attributes.Add("CommandName", attributeName);
No effect.

Anyone?

aliensXY 0 Newbie Poster

I have some texts in my database. Each text has its own id.
My job is to print all texts to a website and add a button to each text. Button will delete appropriate text from the database.

So, I created a for loop so I can print all texts from the db, I also put <asp:Button id="button" runat="server" Text="delete" onclick="some_method" </asp> in the loop.

My problem is that all buttons have the same id and the program cannot know what text to delete. I tried to put in the id attribute a variable created before but I got the message that I cannot put <% %> inside button tag.

I also tried this:
buttonX.Attributes.Add("id", "123");
But onclick event didn't get this id.

Any suggestions. Thank you.