Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: RadGrid keeping textboxes in sync with bounddata column? Pin
Steve Holdorf18-Apr-10 13:15
Steve Holdorf18-Apr-10 13:15 
QuestionCan I Bind method to the control? Pin
marijus518-Apr-10 5:34
marijus518-Apr-10 5:34 
AnswerRe: Can I Bind method to the control? Pin
Brij18-Apr-10 6:20
mentorBrij18-Apr-10 6:20 
GeneralRe: Can I Bind method to the control? Pin
marijus518-Apr-10 7:18
marijus518-Apr-10 7:18 
GeneralRe: Can I Bind method to the control? Pin
Brij18-Apr-10 7:58
mentorBrij18-Apr-10 7:58 
QuestionIssue with WebToolBox.DatePicker... Pin
<<Tash18>>18-Apr-10 3:39
<<Tash18>>18-Apr-10 3:39 
AnswerRe: Issue with WebToolBox.DatePicker... Pin
Sandeep Mewara18-Apr-10 5:26
mveSandeep Mewara18-Apr-10 5:26 
QuestionForcing full postback in UpdatePanel Pin
paper6718-Apr-10 3:04
paper6718-Apr-10 3:04 
Hi,

I have basically the following structure set up :

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
   <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" ... >
   :
   </asp:GridView>
   <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" ... >
   </asp:ObjectDataSource>
   <asp:ImageButton ID="NewInsertButton" runat="server" OnClick="NewInsertButton_Click" />
   <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource2" ... >
      <InsertItemTemplate>
         :
         <asp:FileUpload ID="FileUpload1" runat="server" />
         :
         <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Insert" />
      </InsertItemTemplate>
      :
   </asp:FormView>
   <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" ... >
   </asp:ObjectDataSource>
</ContentTemplate>
</asp:UpdatePanel>


I am aware that a FileUpload requires a full page postback. I read the article
http://www.4guysfromrolla.com/articles/090209-1.aspx[^]

I tried to install a PostBackTrigger programmatically to get a full postback only on the ImageButton1 control. All other postbacks must be partial. (GridView sorting, paging, ...)
In code behind I do :

protected void NewInsertButton_Click(object sender, ImageClickEventArgs e)
{
   FormView1.ChangeMode(FormViewMode.Insert);
   FormView1.DataBind();
   ImageButton InsertButton = FormView1.FindControl("ImageButton1") as ImageButton;
   if (InsertButton == null)
      throw new NullReferenceException("ImageButton1");
   ScriptManager Manager = ScriptManager.GetCurrent(Page);
   if (Manager == null)
      throw new NullReferenceException("ScriptManager");
   Manager.RegisterPostBackControl(InsertButton);
   :
}


The above code does not seem to install a full postback only for the ImageButton1, so the file upload fails. How can I make this work ?
AnswerRe: Forcing full postback in UpdatePanel [modified] Pin
daveyerwin18-Apr-10 4:42
daveyerwin18-Apr-10 4:42 
GeneralRe: Forcing full postback in UpdatePanel Pin
paper6718-Apr-10 8:57
paper6718-Apr-10 8:57 
GeneralRe: Forcing full postback in UpdatePanel Pin
daveyerwin18-Apr-10 12:11
daveyerwin18-Apr-10 12:11 
QuestionInvalid column names in asp.net application with sql server Pin
Lessobvious18-Apr-10 0:48
Lessobvious18-Apr-10 0:48 
AnswerRe: Invalid column names in asp.net application with sql server Pin
Not Active18-Apr-10 1:07
mentorNot Active18-Apr-10 1:07 
GeneralRe: Invalid column names in asp.net application with sql server Pin
Lessobvious18-Apr-10 2:35
Lessobvious18-Apr-10 2:35 
GeneralRe: Invalid column names in asp.net application with sql server Pin
Brij18-Apr-10 6:25
mentorBrij18-Apr-10 6:25 
AnswerRe: Invalid column names in asp.net application with sql server Pin
preetpal kapoor7-Jun-11 5:54
preetpal kapoor7-Jun-11 5:54 
Questionradio button list problem [modified] Pin
SreejithKumar M18-Apr-10 0:00
SreejithKumar M18-Apr-10 0:00 
AnswerRe: radio button list problem Pin
Brij18-Apr-10 0:22
mentorBrij18-Apr-10 0:22 
AnswerRe: radio button list problem Pin
Abhijit Jana18-Apr-10 0:53
professionalAbhijit Jana18-Apr-10 0:53 
QuestionRedirection To Page Issue. Pin
VikashGohil17-Apr-10 21:58
VikashGohil17-Apr-10 21:58 
AnswerRe: Redirection To Page Issue. Pin
dan!sh 17-Apr-10 22:06
professional dan!sh 17-Apr-10 22:06 
GeneralRe: Redirection To Page Issue. Pin
VikashGohil18-Apr-10 23:28
VikashGohil18-Apr-10 23:28 
AnswerRe: Redirection To Page Issue. Pin
Chetan Patel18-Apr-10 0:40
Chetan Patel18-Apr-10 0:40 
GeneralRe: Redirection To Page Issue. Pin
VikashGohil19-Apr-10 6:39
VikashGohil19-Apr-10 6:39 
GeneralRe: Redirection To Page Issue. Pin
Chetan Patel1-Oct-11 23:12
Chetan Patel1-Oct-11 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.