Page is not getting postback when click on button

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/25/2007 7:39:46 AM
Gravatar
Total Posts 3
jigar acharya

Page is not getting postback when click on button

Hi,

I have added one Search.aspx in mojoPortal.Web project. I have added one user control in it(Search.aspx). User control contains one asp.net text box and asp.net button. When i click on button page is not getting postback. I have register user control on web.config file too. Is there any extra setting i have to do? What should be a problem?

When i add button and text box directly on aspx page. page is getting postback but it doesn't retain a value. On Page_Load event, i cant get value of text box. it always return me empty string only.

Do you need any more info please tell me...

Please help me..

Jigar Acharya

 

4/25/2007 8:16:34 AM
Gravatar
Total Posts 18439

Re: Page is not getting postback when click on button

Hi Jigar,

Is your page inheriting from mojoBasePage?

I think I would have to see your code to help. Can you zip the files and email to me and I'll take a look.

Joe

4/25/2007 8:53:49 AM
Gravatar
Total Posts 3
jigar acharya

Re: Page is not getting postback when click on button

I have sent mail to your gmail account.

Thanks for quick reply!

4/25/2007 9:36:07 AM
Gravatar
Total Posts 18439

Re: Page is not getting postback when click on button

Hi Jigar,

I don't see anything in your code that jumps out at me as a problem.

In btnAdvSearch_Click you should be able to get the value from txtSearchOption3.Text

In your page load event you might try commenting out this part:

if (prevTxtSearchFor != null)
{
this.txtSearchOption3.Text = prevTxtSearchFor.Text;
}

as that may be setting it back to empty string

Hope it helps,

Joe

4/25/2007 10:16:04 AM
Gravatar
Total Posts 3
jigar acharya

Re: Page is not getting postback when click on button

Hi Joe

I am also surprised that why i am not getting value of any text boxes.

i am not able to get value of any text box in Page_Load event too...

What my view is this problem may be occured due to View State. Page is not maintaining its view state value. i have set page Page level attribute EnableViewState ="true" but its not maintaining...Somewhere it may be reset the value. i dont know why?

I am trying here. please let me know if you find any solution for that. 

Thanks !

Jigar

4/25/2007 12:02:11 PM
Gravatar
Total Posts 18439

Re: Page is not getting postback when click on button

I don't think it is a viewstate problem. There is nothing in the base page that disables viewstate.

Also btnDoSearch_Click works fine in the original code and it accesses a textbox on the page correctly.

Wish I could be more help, it seems it should work.

Joe

 

You must sign in to post in the forums. This thread is closed to new posts.