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.0Textbox with Actions?Textbox with Actions?
Previous
 
Next
New Post
7/30/2007 1:35 PM
 



Have various modules with source code that contain search inputs or insert inputs attached to asp:textboxes.
I have analyzed the code, and see how dynamically the textbox will call for the @value of string placed within asp:textbox.
What I do not see, is a clear linkage bewteen the asp:textbox / Controller / Info. There is no ID or any tags that seem to link files.
Yet the commands work.  This may work for pre-written source code, but I need a full understanding for moving forward.

The goal, as written in another post, is to have a text input, where IF name in textbox matches name in database column, delete that whole column.
But prompt first with a pop-up screen.

1.) How am I assigning the asp:textbox to be live and collect values under an @textboxid command?

2.) What is proper query tags for:   IF @textboxid = name in database THEN?

3.) How can I build "are you sure you want to delete" verification into a pop-up screen?





Feedback Appreciated,

-Machina12

 
New Post
8/1/2007 11:18 AM
 

In standard ASP.NET module development including DNN module development in your code behind on the various events you will typically take the value from the textbox and send it over to the controller class which will return info objects for you with the needed data in them.

As for how to accomplish number 2 it depends on what you are tying to do.

As for the are you sure you want to delete you can add a return confirm("Are you sure you want to delete"); to the "onClick" event of any button or link button.

If you want specific help I think we would need to see some code to see exactly what you have to work with.

Also Michael Washington has some good general DNN Module tutorials at http://dotnetnuke.adefwebserver.com


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
8/1/2007 12:47 PM
 

The main problem is having the asp:textbox live to collect data. It was to my understanding that the ID allows for me later to call the input values with an @ sign.
When I try to run sql query, it never is analyzing what text was input within tetxbox.  Think I am missing something small?

myCommand.CommandText = "DELETE FROM ModuleName where ClientName = '@textbox' "


Secondly, in regards to the confirmation pop-up, I am familiar with creating the onclick comand in ascx, and then event in .vb, but
the tags:   return confirm("Are you sure you want to delete" ); are not recognized (squigly error lines in editor)


What must I do to get the confirm to pop-up?


-machina12

 
New Post
8/1/2007 1:10 PM
 

You can use the following code in your CodeBehind (or the like):

As far as your former question, it is the worst idea to create dynamic sql commands without first examining the client input. Just imagin what woudl happen if your user types "vitkoz'; DELETE * FROM Users WHERE Username Like '%a" into that textbox...

cmdMyCommand.Attributes.Add("onClick", " return confirm('Are You Sure You Wish To Delete This Information?');");


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
New Post
8/1/2007 1:41 PM
 

Vitkoz,

Appreciate the timely response.
Encountered an issue when trying to use code.

cmdMyCommand.Attributes.Add("onClick", " return confirm('Are You Sure You Wish To Delete This Information?');");

cmdMyCommand is not declared. Tried using just MyCommand. No luck.

The idea is have a delete button, when user clicks delete, they get second option. 
Where are the actins for when user clicks "delete" (ensuring it is assigned to correct data)?
Could add onClick command in ascx. or do this way, whatever you think is easier.

-machina12

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Textbox with Actions?Textbox with 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