Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:833956
More Search Options
RSS Available
Matching Posts
Re: Problem with DefaultButton in Panel
Create a regularexpressionvalidator or a comparevalidator for each of the textboxes. Set the validation group for the buttons and validators to be unique within each panel.
Posted to
Web Forms
(Forum)
by
mckrecker
on 12/22/2008
Re: Extract textbox.text from template field in detailsview
try this in your item updating event: DetailsView dv = (DetailsView)sender; string x = ((TextBox)dv.Rows[13].FindControl("txtRemedyInc")).Text; Or do what MetalAsp.Net suggested, which is use any one of the following built in properties of the item updating event, the first being the best: e.NewValues; e.OldValues; e.Keys; e.CommandArgument;
Posted to
Web Forms
(Forum)
by
mckrecker
on 12/22/2008
Re: Selected Check Boxes Zipcode by the User
First off, don't write all that stuff to a literal. If you really want an HTML table, then use the objects HtmlTable, HtmlTableRow, and HtmlTableCell. Second, you don't need a table for this -- you can use a checkboxlist. This will create a table of checkboxes that can be databound, including to an ArrayList. Third, your adding dynamic controls too late -- you should do it at Page_Init instead of Page_Load, otherwise you won;t be able to take as much advantage of viewstate. (This isn't
Posted to
Getting Started
(Forum)
by
mckrecker
on 12/17/2008
Re: Adding DataTables together
I thought this was interesting so I checked it out. The obvious thing is to use DataTable.Merge. So, you've got ds.Tables[0] that you want to e the "main" table. Then you have ds.Tables[1 to n] that you want to merge. After everything is populated, you would use ds.Tables[0].Merge(ds.Tables[1]) and so on for all the tables to get everything into the "main" table. You could use ds.Tables.Count inside a loop to get them all. The other issue you had is that you want to merge
Posted to
Web Forms
(Forum)
by
mckrecker
on 12/16/2008
Re: how to print out all session variables
C#: Put the string wherever you want to see it, e.g., Label1.Text = SessionContent(); public static string SessionContent() { string str = null; foreach (string key in HttpContext.Current.Session.Keys) { str += string.Format("{0}: {1}<br />", key, HttpContext.Current.Session[key].ToString()); } return str; }
Posted to
Web Forms
(Forum)
by
mckrecker
on 12/15/2008
Re: Need to validate the phone number in asp.net using c#!!
even if you don't want the regular expression control , you can (and probably should) still use a regular expression using Regex.IsMatch method string rgx = @"((\(\d{3}\) ?)|(\d{3}[- \.]))?\d{3}[- \.]\d{4}(\s(x\d+)?){0,1}$" if (System.Text.RegularExpressions.Regex.IsMatch(PhoneTextBox.Text, rgx) { //input matches pattern } else { //input does NOT match pattern }
Posted to
Web Forms
(Forum)
by
mckrecker
on 12/15/2008
Re: Problem Dynamically adding controls to a placeholder
You need to recreate dynamically created controls after every post back. They won't be remembered by ViewState (though the contents will). So, you need to keep track of how many controls have been added, then recreate them after each post back, and then add a new blank row. So my advice would be after the first page load, set a value in ViewState for the current number of rows. After the button click, increment that value and add the row. Then, on the next button click, create a number of rows
Posted to
Web Forms
(Forum)
by
mckrecker
on 12/15/2008
Re: Object information into a label
do what mbischoff said: ret.ToString(). More likely what you want is a given property of the object, so you may want ret.SomeProperty
Posted to
Getting Started
(Forum)
by
mckrecker
on 12/14/2008
Re: How to access data in controls that are added by a Repeater
First of all, you need to do this in some event, like button.Click or button.Command or from the repeater with repeater.ItemCommand. Inside the event, you get the repeater, then loop through each repeater item. For each repeater item you get the textbox with find control. Here's hpw it might look inside a button click event: protected void Button1_Click(object sender, EventArgs e) { foreach (RepeaterItem rpi in Repeater1.Items) { if (rpi.ItemType == ListItemType.Item || rpi.ItemType == ListItemType
Posted to
Data Presentation Controls
(Forum)
by
mckrecker
on 12/13/2008
Re: gridview search problems
To add, try ArrayList arr = new ArrayList(); arr.Add("foo"); gv.DataSource = arr; gv.DataBind(); and to find in the array list, try: if (arr.Contains("foo")) { //do something } If you want to llok for an item in the grid view rows, try this: foreach (GridViewRow gvr in gv.Rows) { //you'll be looping through the table rows of the grid view, so for each row do: Control c = (Control)gvr.FindControl("controlID"); //substitute COntrol with what ever specific control you
Posted to
Getting Started
(Forum)
by
mckrecker
on 12/13/2008
Page 1 of 17 (170 items) 1
2
3
4
5
Next >
...
Last »
WindowsClient:
Snoop with 64 bit support
ASP.NET:
jQuery Hide/Close Link
ASP.NET:
Merry Christmas
TechNet Edge:
FPE Customer Story
Silverlight:
Being a writer, and having an editor. A Short Rant.
Channel 9:
Channel 9 Live at PDC09: Dr Brian Brooks (3M)
Channel 9:
C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 13 of 13
Silverlight:
Information for Silverlight HVP Developers…
WindowsClient:
Custom Content Loaders in Silverlight 4.0
WindowsClient:
MVVM Links\Info
TechNet Edge:
Check out how Dolly Parton uses IE8 and Web slices!!!
Silverlight:
A Silverlight HVP Update
Channel 9:
Channel 9 Live at PDC09: This Week on Channel 9 - PDC09 Daily Show Edition Day 1
Channel 9:
Maria Klawe: Scholar, Scientist and Microsoft Board Member
Channel 10:
Play the Bing Sherlock Holmes Game
Channel 9:
Channel 9 Live at PDC09: Loic Le Meur
Channel 10:
How to Delete Jump List Items
Channel 10:
Roll Back to Classic Network Indicator in Win7
Channel 9:
Jafar Husain: Silverlight Toolkit and Rx, Part 2
Channel 9:
Ping 42: Is Microsoft cool? Photo DNA, Win7 tool, 10k MIX contest
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online