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.0Grab text string from textbox, not sql?Grab text string from textbox, not sql?
Previous
 
Next
New Post
7/25/2007 12:48 PM
 



Am presently able to grab values from sql database.
You would think retrieving a value from a textbox wouldnt be too hard. Can't seem to find answers through forums/online.

To retrieve a value from a textbox, does the textbox need a dedicated column in table?

Looking to add an IF statment under button_click sub:
Want 2 options, ability to ask if string is an exact "something" or ask if it matches a name within table column (for example ClientName)

Hypathetical explination example: (so you know what I am going for) 
If Textbox.Text.Contains = "HardlinedWords" Then       OR        If Textbox.Text.Contains = Name from Column ClientName Then 


How would I code the hardlined string as well as the string that matches name within column of sql table?
(would use seperately)



Feedback Appreciated,

 


-Machina12

 
New Post
7/26/2007 10:22 AM
 

You can do the text comparision via

textbox1.Text.Contains("MyHardCodedText")

Then depending on what your second example is you can do the same tpe of  thing.  I guess I am not 100% sure what your second item is really trying to do


-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
7/26/2007 1:36 PM
 



Mitch,

You seem to be the man with the answers.
I used your advice with retrieving hardlined value.

Funny thing is, I already had been poking around and thought of that solution. Sometimes you just need a nudge in the right direction.
Well in regards to the part of my question you didn't understand, it actually surfaced again, right after successfully using first method.
Hopefully I can clarify.

What I am wondering is within IF statement that uses the hardlined option:  If txtName.Text.Contains("HardlinedText") Then

What about the option to ask something to effect of:   If txtName.Text.Contains("@Name already in a column within table") Then  ?


Need clarity on coding for calling that type information.



Feedback Appreciated,

-Machina12

 
New Post
7/27/2007 1:55 AM
 

I at least try to have answers.

Ok, let me see if I understand this.  You simply want to see if the text inside the textbox contains a name that comes from a specific database record.

In this case you would need to build a query to actually retreive the data that you are trying to compare.  Then you can do the comparision just like you did for the other value.


-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
7/27/2007 11:37 AM
 



O.K.   Have a few questions that have evolved. I tried to number for easiest reply.

What I am going for is a textbox, where user can input a given name, and the query delete that complete column with that matching name.
Aware the query will do the actions, but want to be clear on the rest of the process for this particular action.

1.) Are you illuding that I will have to use the DAL structure to do this with Info.vb and Controller.vb?
2.) Can I just run these actions via query?
3.) If so, because the input needs to be @dynamic, where do I dictate that the textbox will become the @input?
4.) What are proper tags for query to search a given column by @input?

What I am finding most confusing over and over is the connection between .ascx/.vb and controller
Seems to be one ID or TYPE tag that refers to another tag, to another.

5.) In other words, what is the tag name that would link a textbox to it's controller actions.
     Some asp: textboxes have minimal field attributes, and dont link to controller file, but yet actions work?

6.) Basically, I would like to know what are the names of the necessary files will be effected for this?




Feedback Appreciated,

-Machina12

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Grab text string from textbox, not sql?Grab text string from textbox, not sql?


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