Gettin a value from textbox in repeater (Visual Studio 2008)

Hi I'm once again here.

I have a doubt here. I am trying to get store value from a textbox which is in a repeater in a variable. But I don't know how to make it work.







'>
' Enabled="false">
' />
'>Preview








This is my repeater template. I want to get txtName.text in variable(let say 'selected'). What code I should add?
Thanks in advance.
0
sheru2302
5/4/2009 5:04:21 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

5 Replies
909 Views

Similar Articles

[PageSpeed] 19

 Since you textbox is in a repeater you need to use findcontrol to first find your textbox as:

TextBox someTextBox = (TextBox)Repeater..FindControl("textBoxId");

then you can assign it to your variable:

selected =  someTextBox.Text;

 


Thanks,
Karan

~ Remember To Mark The Post(s) That Helped You As The ANSWER ~
0
karan
5/4/2009 5:32:59 PM
I didn't get you clearly Karan. Sorry... Im new to ASP.Net still as trainee.
repeater id: repPage
variable : selected
textbox : txtName
Ok now how should I write that?
I just can figure out this part
TextBox someTextBox = (TextBox)repPage.FindControl("txtName")
selected= someTextBox.Text
But what i should replace with Textbox and sometextbox? Sory once again...
0
sheru2302
5/4/2009 5:57:26 PM

 TextBox someTextBox = (TextBox)repPage.FindControl("txtName")
selected= someTextBox.Text

Above:

TextBox is the control name which you are using or which you want to cast into.

someTextBox is the control id or name you want to give to your textbox (anything you want)

And I assume repPage is the name or id of the repeater you have in your page.

and txtName is the name or id of your textbox which you have inside your repeater.


Thanks,
Karan

~ Remember To Mark The Post(s) That Helped You As The ANSWER ~
0
karan
5/4/2009 6:01:08 PM
But its showing errors. For TextBox its says "'TextBox' is a type and cannot be used as expression". 

Or can I get d datas in Session?

What Im really trying to do is I have a button in the repeater where in click event i want it to check textbox1.text content. Lets say its sony (company name) I will check the database to get url for sony. Then ill direct it to Sony.aspx .

So i need the data from the textbox in repeater to check my database. Is there any other suggestion.

Thanks again.
0
sheru2302
5/4/2009 6:57:38 PM

 can you post your entire code.

Use the link above. There is a link above which you can use to copy and paste your code.


Thanks,
Karan

~ Remember To Mark The Post(s) That Helped You As The ANSWER ~
0
karan
5/4/2009 7:02:22 PM
Reply:

Similar Artilces:

Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the Web Deve
I installed Visual Studio .NET 2003 on Windows Vista Home Premuim, but I'm unable to select "Web Development" item from "Server Components" during the installation. I installed all the pre-requisits but I can not see Front Page Server Extention in the programs. I can see also the IIS. Appreciate if any one can guide me with the solution.   Thanks.   FPSE is not included with Vista, it's a separate download.  See www.iis.net for this. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. Tha...

Which is best for web pages
Which is best to buy to develop aspx web pages. Visual Studio 2008 or Visual web developer 2008? http://forums.asp.net/p/1137916/1824119.aspx#1824119http://blogs.msdn.com/mikhailarkhipov/archive/2006/06/26/647516.aspx We All move to our original place.Don't forget.Imran Baloch Visual Web Developer of course, because it's free!! visual web developer is build into visual studio. in the free copys the desktop apps and websites are two diffrent pages. if all you are looking to do is to make a page you can download your app on make an install file and host it somwhere. ...

What is the difference between Visual studio.net and Visual studio 2008 express?
 I am fairly new in ASP.net development, i have downloaded sql express and visual studio express on the microsoft site, but i was just wondering if there is a huge difference between the express packages and the actual profesional packages. Any ideas on that?www.buggrep.comBest error repository site on the web!! If you are new then dont worry about it it, visual web developer express and sql server express are both fine for developing with all the major features of asp.net / sql server.There are some advanced features that I dont even know what they are.I think that the older sql expr...

Error:Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the We
Hi, I installed the IIS 5.0 after VS.Net 2003 (1.1). after that I did run the aspnet_regiis -i at the visual studio command prompt. I am able to run local web application created on my PC. But when I tried to copy an web application created at shared PC into the wwwroot folder, I get the following error while trying to open the project in VS.Net. I've created the virtual directory for the project and also set the integrated windows authentication under the directory security tab in the IIS. Please help me resolving the problem. Thank You.   Do you have FrontPage Server Ext...

I Have visual studio 2008 how can i convert my web project to work in visual studio 2005?
 I Have visual studio 2008 how can i convert my web project to work in visual studio 2005? where is the option to convert the project to work in vs2005 area? The best way to go about this is to create a new web application by going to:  file -> open -> website -> then select the folder that your website lies in then save the solution as a visual studio 2005 project. but i dont have in save as property, the ability to convert the project to work in visual studio 2005   ok, then lets create a new asp.net web application, then add the existing files from t...

Can Visual Web Developer 2008 & Visual Studio 2008 run on the same machine?
Can Visual Web Developer 2008 & Visual Studio 2008 run on the same machine?  Machine running Windows VISTA. Looking for simplified text formatting options.  Wondering if both programs can be run (not at the same time) VWD for graphics developer and VSP 2008 for programmers.     Quick answer: I believe you can. Why not try it? zoltac007:VWD for graphics developer Why not Expression? (Which shares the same solutions/projects with VS, to make sharing easier.)Richard We 'tried' VISTA way too early and set our development team back three months.&nb...

Silverlight tools with Visual Web Designer 2008 or just Visual Studio Standard 2008?
Should Silverlight tools work with Visual Web Designer 2008? It won't install, even though it is Orcas. It says Orcas has to be installed.  I am trying to play audio for a bunch of songs from my website, and display the lyrics.  Thanks---Bill Rosshttp://woundedego.com hello. make sure you've installed beta 2 and are using the corresponding silverlight tools.-- Regards,Luis Abreuemail: labreu_at_gmail.comEN blog:http://msmvps.com/blogs/luisabreu...

Visual Studio 2008 -or- Visual Web Developer Express 2008 -or- SharePoint Designer / Etc.
It's been a while since I actively designed in dot net.  Now it's time to do some serious updating to our website (from dot net 1.1 to 3.5).  I haven't used any of the new design tools but want to be able to take complete advantage of all the new features of v3.5 and the features of development applications. What are the differences between Visual Studio 2008 / Visual Web Developer Express 2008 / SharePoint Designer / Etc. and are there any others I should consider for development?  I just want to settle on a development platform so I can start moving forward...

Visual Studio .NET
When using Visual Studio .NET and you are in Design View you can access the Web Forms Toolbox. Is there a way to access this tool box in HTML view???Moojjoo Õ¿Õ http://www.mmwebs.comhttp://moojjoo.blogspot.com/ Simple answer...NO. The toolbox is used to drag and drop controls onto a design. The HTML view is used to hard code html tags and asp.net controls. What is it you are trying to do? Regards, Rog. (MCP)Roger Chapman MCP C#.NET Rog, That anwsered my question. I was just wondering if it was possible to drag a control in HTML view, but this wi...

Migrating from Visual Studio .NET 2003 Windows Application to Visual Studio 2005 Web Application
How do I migrate a Visual Studio .NET Windows Application to Visual Studio 2005 Web Application. Are there any tools available for this.  As far as I know there is no direct migration path. You convert VS2003 to VS2005 and then to VS2005 Web Application.Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. manish kumar: How do I migrate a Visual Studio .NET Windows Application to Visual Studio 2005 Web Application. Are there any tool...

Inserting value from textbox in visual web developer 2008 EE
Hi please help me out to solve this problem. I want to insert a record into accessdatasource with the help of textbox control which is outside the formview control (in my case, i dont want to use formview or the other views). In other words, is it possible to bind a textbox control to accessdatasource in visual web developer 2008 express edition? My textboxes are in a content page. please help me out about the neccessary syntax of sql statement and other codings. Use a ControlParameter with your AccessDataSource, and point it to the TextBox in question: http://msdn.microsoft.com/en-us/l...

How to use the mobile web form in visual studio 2008 beta2?
When I want to add a mobile web form to a website, I found that I can't find the mobile web form template in visual studio 2008. In the visual studio 2005, we can use the mobile controls convenience. But I can't find the "Mobile Web Form", "Mobile Web User Control" or "Mobile Web Configuration File" when I want to add a item to the website project in visual studio 2008. I can't find the mobile controls designer.Can you tell me how I can use the mobile controls convenience? Do I need to install other softwares? Have a look here: http://blogs.msdn.co...

error trying to create web form from visual studio.net
I get the following message when I try to create a web form from visual studio. Visual Studio.NET has detected that the specified web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET web applications or services. I downloaded and installed ASP.NET version 1.1. Why am I getting this message? Thanks, Keith Stallings Try running aspnet_regiis -i from the .Net Framework's bin directory to see if it corrects the problem....

populating web form objects when using Visual Studio.NET
What is the best way of creating datasets for asp.net pages and populating web form objects. I have always created datasets within a sub routine and then populated my web form controls from that dataset. I was given some code that the pages were created in visual studio. I know the page gets its data from a stored procedure. What I can't find is code that calls that stored procedure and also populates the web form objects. Most of my asp.net development has been done on the asp.net page and not in Visual Studio. So if someone could tell me what to look for that would be great. Well, t...

Web resources about - Gettin a value from textbox in repeater (Visual Studio 2008) - asp.net.web-forms

Repeaters - Wikipedia, the free encyclopedia
Kyle Halsted, Sonia Logan, and Michael Weeks are inmates at a rehabilitation facility. Bob Simpson, the administrator, tasks them with apologizing ...

Animal Repeater Memory Game HD Free Lite - for iPad for iPad on the iTunes App Store
Get Animal Repeater Memory Game HD Free Lite - for iPad on the App Store. See screenshots and ratings, and read customer reviews.

Consumers warned to beware of illegal mobile phone repeaters
Use of devices sold online as legitimate solution is in fact dangerous and can land you in jail, regulator warns.

Grim repeater: HIV on the rise
CANDLES flicker in the chilly night air as Jesse Hooper appears on the giant cinema screen overlooking Melbourne’s Federation Square. He’s ...

Telstra suspects underbelly of illegal repeaters
'Tens' busted each year. Telstra engineers suspect a "vast" undercurrent of illegal repeaters are causing issues for the carrier's Next G mobile ...

Hands on: Cel-Fi mobile repeater
If your home is a mobile blackspot then a Cel-Fi mobile repeater might help you stay connected.

Amped Wireless R20000G, SR20000G, and UA2000: Routers, Repeaters, and Adapters
... and throughput when pointed at your wireless router/access point. Rounding out the review, Amped sent a third product, their SR20000G repeater, ...

Photon heralds entanglement in new quantum repeater
... For ordinary electrical wires (such those used for ethernet), signals can travel long distances because they're boosted by means of repeaters ...

Celebrity Rehab Repeaters
Kate Middleton Bikini Photos 50 Shades of Grey Hollywood Couples Red Carpet The Kardashians Best Dressed Hot Bodies Celebrity Kids News Sightings ...

Computer networking: wireless networks (wifi), routers, repeaters & more - CNET Reviews
Computer networking reviews and ratings, video reviews, user opinions, most popular network hardware, wireless network buying guides, prices, ...

Resources last updated: 12/3/2015 3:10:56 AM