<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tag 'postback'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=postback&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'postback'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Strange Bug in Validator Controls regardings Display Modes (dynamic, static)</title><link>http://forums.asp.net/thread/3559990.aspx</link><pubDate>Fri, 11 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3559990</guid><dc:creator>360airwalk</dc:creator><description>&lt;p&gt;I ran across a weird behaviour when using ValidatorControls. After some trial and error i could produce the following simple example to reproduce the issue.&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;Default.aspx.cs&amp;quot; Inherits=&amp;quot;WebApplication1._Default&amp;quot; %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;

&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; &amp;gt;
&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;div&amp;gt;
            &amp;lt;asp:TextBox ID=&amp;quot;EmailTextBox&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;        
            &amp;lt;asp:RequiredFieldValidator ID=&amp;quot;RequiredFieldValidator1&amp;quot; runat=&amp;quot;server&amp;quot; ErrorMessage=&amp;quot;RequiredFieldValidator&amp;quot; ControlToValidate=&amp;quot;EmailTextBox&amp;quot; Display=&amp;quot;Dynamic&amp;quot;&amp;gt;
            &amp;lt;/asp:RequiredFieldValidator&amp;gt;
            &amp;lt;asp:Button ID=&amp;quot;Button1&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Postback&amp;quot; CssClass=&amp;quot;buttonGreen&amp;quot;  /&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;br /&gt;Now do the following:&lt;br /&gt;1.) Just click on the Button -&amp;gt; the client side error message of the validator will appear because the textbox is empty.&lt;br /&gt;2.) Now enter something in the textbox and click the button again -&amp;gt; the error message will disappear but no postback happens&lt;br /&gt;&lt;br /&gt;Now change Display=&amp;quot;Dynamic&amp;quot; to Display=&amp;quot;Static&amp;quot; and repeat the 2 steps above. it works as excepted.&lt;br /&gt;&lt;br /&gt;i know the tags a rendered differently in that dynamic renders to &amp;quot;display:none&amp;quot; and static renders to &amp;quot;visibility:hidden&amp;quot;. this must be a bug in the underlying javascript or sth, i can&amp;#39;t think of anything else.&lt;br /&gt;&lt;br /&gt;Has anybody else run into this issue? &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Help - Validators fire unexpectedly...</title><link>http://forums.asp.net/thread/3554502.aspx</link><pubDate>Tue, 08 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3554502</guid><dc:creator>celoftis</dc:creator><description>&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;BACKGROUND&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;Using VS2005, VB code behind, UpdatePanels and the AJAX control toolkit v1.0.61025.0,&lt;/div&gt;&lt;p&gt;I have a fairly complex master/content page with a few UpdatePanels. In UpdatePanel1 I have several input controls. Based on the input of one TextBox I need to show/hide other controls - so onblur of the TextBox I run some javascript to click a hidden button (that is also inside&amp;nbsp;UpdatePanel1) then on the server side I interrogate the TextBox value and show/hide controls as needed. This works well as the button gets clicked as expected. The hidden button has its CausesValidation value set to &amp;quot;False&amp;quot; in hopes that no validation would be executed. All validators in UpdatePanel1 and a ValidationSummary control have their ValidationGroup value set to &amp;quot;Group1&amp;quot;.&lt;/p&gt;&lt;p&gt;Another UpdatePanel (i.e. UpdatePanel2) on the page is wrapped inside a ModalPopupExtender. UpdatePanel2 also contains input controls with at least one CustomValidator that has server side validation code. All validators in UpdatePanel2 and a ValidationSummary control have their ValidationGroup value set to &amp;quot;Group2&amp;quot;.&amp;nbsp;The ModalPopupExtender and UpdatePanel2 are displayed (via server side code) based on some input condition to provide more user input (in the example below I provide a simple button to show the Modal Popup).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;PROBLEM&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Given that TextBox1 in UpdatePanel1 initially has focus - whenever the TextBox looses focus (fires the onblur javascript) to a CheckBox or DropDownList (or ListBox, not included in the example below) the client and server-side validators execute even though the hidden button has its CausesValidation value set to &amp;quot;False&amp;quot;. If TextBox1 looses its focus to a Label or another TextBox, the validators do not fire, as expected.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;QUESTION&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Why do the validators fire when the TextBox looses focus to the CheckBox or DropDownList (or ListBox) controls (versus when the TextBox looses focus to another TextBox or Label control) and how can I get around this? I was not expecting client or sever side validators to fire given that the hidden button (Button1) has its CausesValidation value set to &amp;quot;False&amp;quot;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;STEPS TO REPRODUCE THE PROBLEM ON THE SAMPLE PAGE BELOW&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Place a breakpoint on the code-behind Sub CustomValidator2_ServerValidate.&lt;/li&gt;&lt;li&gt;Place your cursor in TextBox1 (highlighted Yellow) then click (give focus) on Label1 (&amp;quot;Label1 initially rendered&amp;quot;) or TextBox2. This will fire the onblur javascript code that in-turn clicks the hidden Button1 control. The server side executes and Label1&amp;#39;s Text value gets updated as expected. Notice that the CustomValidator2_ServerValidate sub did not fire (as expected).&lt;/li&gt;&lt;li&gt;Now click in TextBox1 again, then click the CheckBox1 or DropDownList1. CustomValidator2_ServerValidate will fire along with all the client validators. Since the code in CustomValidator2_ServerValidate expects this validation only to run when the modal popup is displayed then it gets shown to display modal popup&amp;#39;s input errors.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I have posted a working, simplified example page to show the problem I describe above - copy and paste and give it a try.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;MARKUP&lt;/span&gt;&lt;/p&gt;&lt;pre name="code" class="xhtml"&gt;&amp;lt;%@ Page Language=&amp;quot;VB&amp;quot; AutoEventWireup=&amp;quot;false&amp;quot; CodeFile=&amp;quot;Default4.aspx.vb&amp;quot; Inherits=&amp;quot;Default4&amp;quot;
    EnableEventValidation=&amp;quot;False&amp;quot; %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;Untitled Page&amp;lt;/title&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
        function clickButton1() {
            var objButton1 = document.getElementById(&amp;#39;&amp;lt;%= Me.Button1.ClientID %&amp;gt;&amp;#39;)
            if (objButton1) {
                objButton1.click();
            }
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form runat=&amp;quot;server&amp;quot; id=&amp;quot;form1&amp;quot;&amp;gt;
        &amp;lt;div&amp;gt;
            &amp;lt;ajaxToolkit:ToolkitScriptManager runat=&amp;quot;server&amp;quot; ID=&amp;quot;ToolkitScriptManager1&amp;quot; /&amp;gt;
            &amp;lt;asp:UpdatePanel runat=&amp;quot;server&amp;quot; ID=&amp;quot;UpdatePanel1&amp;quot; ChildrenAsTriggers=&amp;quot;True&amp;quot; UpdateMode=&amp;quot;Conditional&amp;quot;&amp;gt;
                &amp;lt;ContentTemplate&amp;gt;
                    &amp;lt;asp:Panel runat=&amp;quot;server&amp;quot; ID=&amp;quot;Panel1&amp;quot; GroupingText=&amp;quot;Panel1&amp;quot;&amp;gt;
                        &amp;lt;asp:ValidationSummary runat=&amp;quot;server&amp;quot; ID=&amp;quot;ValidationSummary1&amp;quot; ValidationGroup=&amp;quot;Group1&amp;quot; DisplayMode=&amp;quot;List&amp;quot; /&amp;gt;
                        &amp;lt;asp:Button runat=&amp;quot;server&amp;quot; ID=&amp;quot;Button1&amp;quot; CausesValidation=&amp;quot;False&amp;quot; ValidationGroup=&amp;quot;Group1&amp;quot; Style=&amp;quot;display: none;&amp;quot; /&amp;gt;
                        &amp;lt;asp:Label runat=&amp;quot;server&amp;quot; ID=&amp;quot;Label1&amp;quot; Text=&amp;quot;Label1 initially rendered&amp;quot; /&amp;gt;
                        &amp;lt;br /&amp;gt;
                        &amp;lt;asp:DropDownList runat=&amp;quot;server&amp;quot; ID=&amp;quot;DropDownList1&amp;quot;&amp;gt;
                            &amp;lt;asp:ListItem Text=&amp;quot;Item 1&amp;quot; Value=&amp;quot;0&amp;quot; Selected=&amp;quot;true&amp;quot; /&amp;gt;
                            &amp;lt;asp:ListItem Text=&amp;quot;Item 2&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;
                        &amp;lt;/asp:DropDownList&amp;gt;
                        &amp;lt;asp:RequiredFieldValidator runat=&amp;quot;server&amp;quot; ID=&amp;quot;RequiredFieldValidator1&amp;quot; Text=&amp;quot;*&amp;quot; Display=&amp;quot;Dynamic&amp;quot; ErrorMessage=&amp;quot;Client-side: Missing required DropDownList1&amp;quot; ControlToValidate=&amp;quot;DropDownList1&amp;quot; InitialValue=&amp;quot;0&amp;quot; ValidationGroup=&amp;quot;Group1&amp;quot; /&amp;gt;
                        &amp;lt;br /&amp;gt;
                        &amp;lt;asp:CheckBox runat=&amp;quot;server&amp;quot; ID=&amp;quot;CheckBox1&amp;quot; /&amp;gt;
                        &amp;lt;br /&amp;gt;
                        &amp;lt;asp:TextBox runat=&amp;quot;server&amp;quot; ID=&amp;quot;TextBox1&amp;quot; BackColor=&amp;quot;Yellow&amp;quot; Width=&amp;quot;95%&amp;quot; onblur=&amp;quot;clickButton1();&amp;quot; /&amp;gt;
                        &amp;lt;asp:RequiredFieldValidator runat=&amp;quot;server&amp;quot; ID=&amp;quot;RequiredFieldValidator2&amp;quot; ControlToValidate=&amp;quot;TextBox1&amp;quot; Display=&amp;quot;Dynamic&amp;quot; Text=&amp;quot;*&amp;quot; ErrorMessage=&amp;quot;Client-side: Missing requried TextBox1&amp;quot; ValidationGroup=&amp;quot;Group1&amp;quot; /&amp;gt;
                        &amp;lt;asp:TextBox runat=&amp;quot;server&amp;quot; ID=&amp;quot;TextBox2&amp;quot; Width=&amp;quot;95%&amp;quot; /&amp;gt;
                        &amp;lt;asp:Button runat=&amp;quot;server&amp;quot; ID=&amp;quot;Button2&amp;quot; Text=&amp;quot;Validate Panel 1 input controls&amp;quot; CausesValidation=&amp;quot;True&amp;quot; ValidationGroup=&amp;quot;Group1&amp;quot; /&amp;gt;
                        &amp;lt;asp:Button runat=&amp;quot;server&amp;quot; ID=&amp;quot;Button3&amp;quot; Text=&amp;quot;Show Modal Popup&amp;quot; CausesValidation=&amp;quot;False&amp;quot; /&amp;gt;
                    &amp;lt;/asp:Panel&amp;gt;
                &amp;lt;/ContentTemplate&amp;gt;
            &amp;lt;/asp:UpdatePanel&amp;gt;
            &amp;lt;asp:Panel runat=&amp;quot;server&amp;quot; ID=&amp;quot;Panel2&amp;quot; Style=&amp;quot;display: none;&amp;quot; GroupingText=&amp;quot;Panel2&amp;quot; Width=&amp;quot;75%&amp;quot;&amp;gt;
                &amp;lt;asp:UpdatePanel runat=&amp;quot;server&amp;quot; ID=&amp;quot;UpdatePanel2&amp;quot; ChildrenAsTriggers=True UpdateMode=&amp;quot;Conditional&amp;quot;&amp;gt;
                    &amp;lt;ContentTemplate&amp;gt;
                        &amp;lt;asp:Panel runat=&amp;quot;server&amp;quot; ID=&amp;quot;Panel3&amp;quot;&amp;gt;
                            &amp;lt;asp:Button runat=&amp;quot;server&amp;quot; ID=&amp;quot;Button4&amp;quot; Text=&amp;quot;Validate ListBox&amp;quot; CausesValidation=&amp;quot;False&amp;quot; style=&amp;quot;display:none;&amp;quot; /&amp;gt;
                            &amp;lt;ajaxToolkit:ModalPopupExtender runat=&amp;quot;Server&amp;quot; ID=&amp;quot;ModalPopupExtender1&amp;quot; TargetControlID=&amp;quot;Button4&amp;quot; PopupControlID=&amp;quot;Panel2&amp;quot; CancelControlID=&amp;quot;Button6&amp;quot; PopupDragHandleControlID=&amp;quot;Panel2&amp;quot; /&amp;gt;
                            &amp;lt;asp:ValidationSummary runat=&amp;quot;server&amp;quot; ID=&amp;quot;ValidationSummary2&amp;quot; ValidationGroup=&amp;quot;Group2&amp;quot; DisplayMode=&amp;quot;List&amp;quot; /&amp;gt;
                            &amp;lt;asp:ListBox runat=&amp;quot;server&amp;quot; ID=&amp;quot;ListBox1&amp;quot; SelectionMode=&amp;quot;single&amp;quot; Width=&amp;quot;95%&amp;quot; Rows=&amp;quot;2&amp;quot;&amp;gt;
                                &amp;lt;asp:ListItem Text=&amp;quot;Item 1&amp;quot; Value=&amp;quot;0&amp;quot; Selected=&amp;quot;true&amp;quot; /&amp;gt;
                                &amp;lt;asp:ListItem Text=&amp;quot;Item 2&amp;quot; Value=&amp;quot;1&amp;quot; /&amp;gt;
                            &amp;lt;/asp:ListBox&amp;gt;
                            &amp;lt;asp:RequiredFieldValidator runat=&amp;quot;server&amp;quot; ID=&amp;quot;RequiredFieldValidator3&amp;quot; ControlToValidate=&amp;quot;ListBox1&amp;quot; ErrorMessage=&amp;quot;Client-side: Missing required ListBox1&amp;quot; InitialValue=&amp;quot;0&amp;quot; Text=&amp;quot;*&amp;quot; Display=&amp;quot;Dynamic&amp;quot; ValidationGroup=&amp;quot;Group2&amp;quot; /&amp;gt;
                            &amp;lt;asp:CustomValidator runat=&amp;quot;server&amp;quot; ID=&amp;quot;CustomValidator2&amp;quot; ControlToValidate=&amp;quot;ListBox1&amp;quot; Text=&amp;quot;*&amp;quot; Display=&amp;quot;Dynamic&amp;quot; ValidationGroup=&amp;quot;Group2&amp;quot; /&amp;gt;
                            &amp;lt;asp:Button runat=&amp;quot;server&amp;quot; ID=&amp;quot;Button5&amp;quot; Text=&amp;quot;Validate ListBox&amp;quot; ValidationGroup=&amp;quot;Group2&amp;quot; CausesValidation=&amp;quot;True&amp;quot; /&amp;gt;
                            &amp;lt;asp:Button runat=&amp;quot;server&amp;quot; ID=&amp;quot;Button6&amp;quot; Text=&amp;quot;Cancel ModalPopupExtender1&amp;quot; CausesValidation=&amp;quot;False&amp;quot; /&amp;gt;
                        &amp;lt;/asp:Panel&amp;gt;
                    &amp;lt;/ContentTemplate&amp;gt;
                &amp;lt;/asp:UpdatePanel&amp;gt;
            &amp;lt;/asp:Panel&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;CODE-BEHIND&lt;/span&gt;&lt;/p&gt;&lt;pre name="code" class="vb.net"&gt;Partial Class Default4
    Inherits System.Web.UI.Page

    Protected Sub CustomValidator2_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator2.ServerValidate
        args.IsValid = False
        Me.CustomValidator2.ErrorMessage = &amp;quot;Server-side: CustomValidator2 validation fired at &amp;quot; &amp;amp; Now
        Me.UpdatePanel2.Update()

        &amp;#39; If ModalPopup input control(s) have errors, display popup and error message(s)
        If args.IsValid Then
        Else
            Me.ModalPopupExtender1.Show()
        End If
    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        &amp;#39; Show/Hide other controls... (for example update a Label1)
        Me.Label1.Text = &amp;quot;Button1 Click fired at &amp;quot; &amp;amp; Now
    End Sub

    Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.UpdatePanel2.Update()
        Me.ModalPopupExtender1.Show()
    End Sub

End Class&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to retrieve page URL</title><link>http://forums.asp.net/thread/3552169.aspx</link><pubDate>Mon, 07 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3552169</guid><dc:creator>markgr26@hotmail.com</dc:creator><description>&lt;p&gt;&amp;nbsp;Here are a few useful properties of Request object.&amp;nbsp; You will find that some of the values are duplicated between properties - do some googling and you will find more.&amp;nbsp; Knock up a test web page and output all these values.&amp;nbsp; It&amp;#39;s useful info.&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;        Request.PhysicalPath;
        Request.RawUrl;
        
        Request.Url.OriginalString;
        Request.Url.PathAndQuery;
        Request.Url.Query;
        Request.Url.Port;
        Request.Url.Scheme;
        Request.Url.IsLoopback;
        Request.Url.AbsolutePath;
        Request.Url.AbsoluteUri;&lt;/pre&gt;
&lt;p&gt;Also, if you do ever need to find out which control posted back then this seems to do the trick:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;        public static Control GetPostBackControl(Page page) {
            Control ctrl = null;
            string et = page.Request.Params.Get(&amp;quot;__EVENTTARGET&amp;quot;);
            if (!string.IsNullOrEmpty(et)) {
                ctrl = page.FindControl(et);
            } else {
                foreach (string ctl in page.Request.Form) {
                    Control c = page.FindControl(ctl);
                    if (c is System.Web.UI.WebControls.Button) {
                        ctrl = c;
                        break;
                    }
                }
            }
            return ctrl;
        }&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Tips and articles about C#, Asp.Net Design, C# Design Patterns, CSS and GUI Design, GUI Layout, Javascript, Javascript with Asp.Net, Ajax" href="http://designcodetest.blogspot.com/"&gt;Mark Graham [DESIGN CODE TEST]&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: accessing controls in SSL VPN</title><link>http://forums.asp.net/thread/3535927.aspx</link><pubDate>Fri, 27 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3535927</guid><dc:creator>elenaaram</dc:creator><description>&lt;p&gt;Hi, I got a similar problem...&lt;/p&gt;
&lt;p&gt;My linkbuttons doesn´t work with vpn access. Either, I have problems with dropdownlist with AutoPostBack= true&lt;/p&gt;
&lt;p&gt;It´s urgent for me... &lt;/p&gt;
&lt;p&gt;Any Ideas???&lt;/p&gt;</description></item><item><title>Javascript, Viewstate and Postback</title><link>http://forums.asp.net/thread/3533064.aspx</link><pubDate>Wed, 25 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3533064</guid><dc:creator>staywarde</dc:creator><description>&lt;p&gt;Hi guys.&lt;/p&gt;&lt;p&gt;I am &lt;span id="result_box"&gt;&lt;span&gt;developing a website where the client download and xml-file in javascript and put in a &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;dropdownbox&lt;/span&gt;&lt;/span&gt;&lt;span id="result_box"&gt;&lt;span&gt;, but my problem is, when i want the data from the &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;dropdownbox&lt;/span&gt;&lt;/span&gt;&lt;span id="result_box"&gt;&lt;span&gt; in a postback I just get a empty value.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;How can I fix that?&lt;/b&gt; I know the problem is the ViewState don&amp;#39;t have the data and because of the security asp.net is like this.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Dynamic controls and state management</title><link>http://forums.asp.net/thread/3525829.aspx</link><pubDate>Sat, 21 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3525829</guid><dc:creator>aneasytorememberid</dc:creator><description>&lt;p&gt;I have placeholders which contain drop downs and text boxes. every time the user clicks add more a new placeholder with these elements is added. But I have to repopulate the previously filled placeholders everytime which fires unwanted selectedchanges/ textbox events. For example when I am adding the 4th placeholders, seelctedindex changedevents are fired for for place holders from 1 to 3 before the 4th one. Is it possible to add just the current place holder without having to repopulate the earlier placeholders. I am using sessions to repopulate. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;In my page load i have:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If Page.IsPostBack Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For i As Integer = 1 To ImporterCounter&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; populatePlaceHolder(i)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&amp;nbsp;End If&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>how to do partial post back without update panel</title><link>http://forums.asp.net/thread/3521807.aspx</link><pubDate>Thu, 19 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3521807</guid><dc:creator>aditaya</dc:creator><description>&lt;p&gt;hi i want to know how to postback a part without complete postback of the page i dont want to use update panel&lt;/p&gt;
&lt;p&gt;can anybody provide java script for&amp;nbsp;it&amp;nbsp;&lt;/p&gt;</description></item><item><title>costomize postback</title><link>http://forums.asp.net/thread/3518464.aspx</link><pubDate>Tue, 17 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3518464</guid><dc:creator>DrZ3D</dc:creator><description>&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt;i have a DropDownList in my page, AoutoPostback is true.&lt;/p&gt;
&lt;p&gt;when the page is postback, i set the page to redirect to the same url, because of with this DropDownList i change the theme and masterpage of page and i read from profile (what to be load). that&amp;#39;s because of i need to redirect to same url to see the effect. (i set redirect from masterpage)&lt;/p&gt;
&lt;p&gt;now the problem is when i use some page to need postback like ContactUs.aspx or Login.aspx after i push the button the page redirect the same url and page doesn&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;now i need to know is there any method to say page if the postback is frome DropDownList redirect to same page if not don&amp;#39;t redirect?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;</description></item><item><title>Accesing control value in GridView on postback</title><link>http://forums.asp.net/thread/3513861.aspx</link><pubDate>Sun, 15 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3513861</guid><dc:creator>kalhoro</dc:creator><description>&lt;p&gt;I&amp;#39;ve a user control, which contains GridView. The gridview is bound to the ObjectDataSource. The gridview is displaying checkboxes in the shape of matrix like below&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;table class="mceItemTable"&gt;
     &lt;tr&gt;
        &lt;th&gt;Title&lt;/th&gt;
        &lt;th&gt;View&lt;/th&gt;
        &lt;th&gt;Insert&lt;/th&gt;
        &lt;th&gt;Edit&lt;/th&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
        &lt;td&gt;Users&lt;/td&gt;
        &lt;td&gt; checkbox&lt;/td&gt;
        &lt;td&gt; checkbox&lt;/td&gt;
        &lt;td&gt; checkbox&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
        &lt;td&gt;Page Data&lt;/td&gt;
        &lt;td&gt; checkbox&lt;/td&gt;
        &lt;td&gt; checkbox&lt;/td&gt;
        &lt;td&gt; checkbox&lt;/td&gt;
     &lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;The columns and Titles are dynamic, which is generated by the object(which is used by ObjectDataSource). The data of the grid is displayed correctly without any problem. Under the grid there is button. On the button click I want to know, which check boxes are checked. I can loop through every row of the grid and can access the checkbox also.&lt;/p&gt;&lt;p&gt;Now, problem is, on button click when I am looping through gridview rows, all checkboxes are shown as unchecked while before click I check some checkboxes.&lt;/p&gt;&lt;p&gt;Strange behavior is this, that, on 1st click, checkboxes are not retaining checked state, while on 2nd click, same code shows checked check boxes correctly.&lt;/p&gt;&lt;p&gt;In short, problem is on 1st click, while subsequent clicks are working as expected. Is there anybody who can tell whats wrong?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Dropdown Postback with Value updates?</title><link>http://forums.asp.net/thread/3513233.aspx</link><pubDate>Sat, 14 Nov 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3513233</guid><dc:creator>Plague2006</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;This is what I am trying to do.&lt;/p&gt;&lt;p&gt;In a client form where there are many fields, one of the options is to set their location. And if they select to set their location in the dropdown, then I want to show the row where Country and City dropdowns are. When they select the country, cities under the country should be listed and user can select the city.&lt;/p&gt;&lt;p&gt;I didn&amp;#39;t have any problem with this in ASP.NET. I had an ajax postback for this section and filled the dropdown values through that. However, I am at a loss in MVC. If I do show/hide using JQuery, then how can I update the dropdown values onChange? And the form has many values. How do I partial postback only the dropdown location area?&lt;/p&gt;&lt;p&gt;Also, for static dropdown lists, do I really need to create an SelectList array in the controller for it to bind? Can&amp;#39;t I use the old fashion dropdownlist they have in ASP.NET?&lt;/p&gt;&lt;p&gt;I am finding it difficult to switch from ASP.NET to MVC. I hope someone can assist.&lt;/p&gt;</description></item></channel></rss>