Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreProduct Search ModuleProduct Search Module
Previous
 
Next
New Post
1/8/2010 1:06 AM
 

One more thing.Please can you tell me how to get textbox value in the button click event.It is not working for normal methods. Please can you advice me on this.

 

I have done something like this. I used same names (WHich has highligted below) used in token for the controls. I appriciate if you can help me on this.

          DropDownList ddlMYSEARCH = (sender as DropDownList);
                    TextBox txtMYSEARCH = (sender as TextBox);

                    if (ddlMYSEARCH != null && txtMYSEARCH != null && ddlMYSEARCH.SelectedValue.ToString() != null && txtMYSEARCH.Text.ToString() != null)
                    {
                        moduleNav.SearchField = ddlMYSEARCH.SelectedValue.ToString();
                        moduleNav.SearchText = txtMYSEARCH.Text.ToString();
                    }
                    else
                    {
                        moduleNav.SearchField = "Manufacturer";
                        moduleNav.SearchText = "J";

                    }

 

 
New Post
1/8/2010 9:09 AM
 

Hi,

One and only problem is how to pass and get the values in button click event. I passed it throgh the commandargument and it is working. But If I assign it to the text box value then it is not working. text box value is always empty. Please can you  tell me how to get this value in the token and padd it to the click event.

 

Appriciate if you can help me.

Thank You very much,

 

 
New Post
1/8/2010 9:18 AM
 

Hi Yma,

Ths is not related to the Store module but to how ASP.NET works! You need a really good book on this subject, I can't give you a title because my books are in French. :-) You have to understand that I can't support ASP.NET for the world. I always explain that the Store module is not a simple one, because it use several advanced concept like the dynamic generation of controls to build the Catalog. This require a stong knowledge about ASP.NET.

If your code is in the button click event, you can't use the sender object to do what you try. The sender object is a reference to the object source of the event, in this case the button not the dropdownlist nor the textbox. As explain in my previous post, your controls are generated "on the fly". You have to give them an id to be able to retreive them at runtime (when the user click on the button).

Start ASP.NET crash course:

In the token code (ProductList.cs - processToken) you need something like that:

TextBox txtMYSEARCH = new TextBox();
txtMYSEARCH.ID = "txtMYSEARCH";
DropDownList ddMYSEARCH = new DropDownList();
ddMYSEARCH.ID = "ddMYSEARCH";

And in the button click event code, you need this to retreive a reference to your controls:

TextBox txtMYSEARCH = (TextBox)this.FindControl("txtMYSEARCH");
DropDownList ddMYSEARCH = (DropDownList)this.FindControl("ddMYSEARCH");

End of ASP.NET crash course.

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
New Post
1/11/2010 12:43 AM
 

Hello Gilles,

Hope you had a good weekend,

I sent you a reply for your prev. reply at that moment when you posted your reply. But Some other reason it had not sent to the forum. I checked for a reply from you and I noticed it this morning. How ever I wanted to thanks for your great help and give you 1000000000000000000000000 + 1 points for the advices. :-) . Now my search module is working pefectly.

If you are not getting angry Shall I ask one thing? I have followed the featured products implementation for my Search module. But I want to add pagination function like category products for the completion to this module. Then it will see as acompleted search module. Is it feasible to do for the Search module. If it is so how can I use it. Where should I reffer for this?

Apriciate if you can help me to this too.

Tnx,

Y Ma

 

 
New Post
1/11/2010 9:22 AM
 

Hi Yma,

I'm fine thank you. If you have used a ProductList object, you should be able to use the pagination. Did you create a new template file? If yes, it should look close to the ProductList.htm template.

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreProduct Search ModuleProduct Search Module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out