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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Multiple Handles and/or Actions?Multiple Handles and/or Actions?
Previous
 
Next
New Post
8/14/2007 11:11 AM
 

Westa,

Calling a seperate DataBinding is exactly what I am looking for.
Already am running a few bits of code that DataBind, but want an understanding of the tags and validations.
I am aware that it will be a two step process. Creating the DataBind Command & Calling the command.

I already have the DataBind Command, I just need to know how the (By val  As Object  As)  tags will go.
This is for both parts of the process.

The DataBinds I am already using have vals of:  Private Sub ShowData(ByVal SearchString As String)
So I am not quite sure what my vals would be. Possibly: Public Sub RefreshData(ByVal sender As Object, ByVal e As System.EventArgs)

This throws arguments too. I think you'll understand what I am asking.
How should the Subs tags be formated for custom events?
& for calling the event?



-machina12

 
New Post
8/15/2007 12:18 AM
 

What I mean, and what it sounds like the other people [too lazy to go back and find your username(s)] mean, is that you need to create a function

private void MyFunc(params here)
{
        //Data binding code here
}

Then in page_init you will call MyFunc

private void Page_Init([Params])
{
      MyFunc(params);
}

Which will do the rebinding.
Then from the button click you would have

private void Button1_Click(PARAMS)
{
      MyFunc(params);
}

which will also run the databinding code you have set in the MyFunc function.

I specify all that because it sounded like you thought you needed to make a *.DataBind() function for your page that was triggered by an event, ect. That's far more than you need. Just a seperate function should do exactly what you need. Yea, it's C# not VB, I don't do the VB so well.

 
New Post
8/15/2007 12:10 PM
 



Baatezu,

Your attention to detail is apprecated, and your posts are proving to be quite useful.
This makes sense. I am already using a custom command for searching, but that was a snippet from another module.
So, I was aware of the proccess, but wanted a firm understanding. 

The only element of your post that I am a bit unclear is the parameter I should be using. I tried using what I thought was a basic parameter.
This is what I am using for my function:

Private Sub MyFunc(ByVal sender As Object, ByVal e As System.EventArgs)

But when I goto call function using:

MyFunc(ByVal sender As Object, ByVal e As System.EventArgs)

It mentions: "expression expected"  and I also tried: MyFunc()

What would you recommend for a basic calling parameter?


-machina12

 

 
New Post
8/15/2007 8:20 PM
 

When you call a function you pass in VALUES not declarations:

So the following is incorrect:

MyFunc(ByVal sender As Object, ByVal e As System.EventArgs)

Instead you would use something like:

MyFunc( sender ,  e )

Westa

 
New Post
8/16/2007 3:43 AM
 

:)
I try to be useful, also, often lazy.

wtatters wrote

When you call a function you pass in VALUES not declarations:

So the following is incorrect:

MyFunc(ByVal sender As Object, ByVal e As System.EventArgs)

Instead you would use something like:

MyFunc( sender ,  e )

Westa

To expand on what westa has said;
Create your function
Private Sub MyFunc(ByVal sender As Object, ByVal e As System.EventArgs)
    'Your Code Here
End Sub

Then in your Event Functions (Page_Init or Button_Click) you would call MyFunc as;
MyFunc(sender, e)

sender and e are both the parameters from the Event Functions, incase they are called something else for some reason.

Hope that helps more.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Multiple Handles and/or Actions?Multiple Handles and/or Actions?


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