Showing posts with label back. Show all posts
Showing posts with label back. Show all posts

Saturday, March 31, 2012

Text box

Could someone help me.

After hitting the submit page how do get the text box to clear? The
page is posting back to itself. What do I put on the code behind page?Just change the "EnableViewState" property of the Textbox to "False" in the
Properties Windows at design-time. No code necessary.

"JJ297" <nc297@.yahoo.comwrote in message
news:1193771080.275874.158090@.y42g2000hsy.googlegr oups.com...

Quote:

Originally Posted by

Could someone help me.
>
After hitting the submit page how do get the text box to clear? The
page is posting back to itself. What do I put on the code behind page?
>


"JJ297" <nc297@.yahoo.comwrote in message
news:1193771080.275874.158090@.y42g2000hsy.googlegr oups.com...

Quote:

Originally Posted by

After hitting the submit page how do get the text box to clear? The
page is posting back to itself.


The submit page...?

Quote:

Originally Posted by

What do I put on the code behind page?


What are you trying to do exactly...?

Please clarify precisely what you mean...

--
Mark Rae
ASP.NET MVP
http://www.markrae.net
IMO it won't work as persisting the texbox content is not done using
viewstate. By design field values are posted to a server (this is how an
HTML form works). The viewstate is there for any other property you could
have to maintain between postbacks except the textbox content).

Your best bet is to explicitelty set the value to an empty string in the
submit button event handler...

--
Patrice

"Scott M." <s-mar@.nospam.nospama crit dans le message de news:
udr8XiyGIHA.1184@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

Just change the "EnableViewState" property of the Textbox to "False" in
the Properties Windows at design-time. No code necessary.
>
>
"JJ297" <nc297@.yahoo.comwrote in message
news:1193771080.275874.158090@.y42g2000hsy.googlegr oups.com...

Quote:

Originally Posted by

>Could someone help me.
>>
>After hitting the submit page how do get the text box to clear? The
>page is posting back to itself. What do I put on the code behind page?
>>


>
>


Just add this to your code:
MyTextBox.text=""

--

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup

"JJ297" <nc297@.yahoo.comwrote in message
news:1193771080.275874.158090@.y42g2000hsy.googlegr oups.com...

Quote:

Originally Posted by

Could someone help me.
>
After hitting the submit page how do get the text box to clear? The
page is posting back to itself. What do I put on the code behind page?
>


On Oct 30, 3:37 pm, "David Wier" <d...@.dw.comwrote:

Quote:

Originally Posted by

Just add this to your code:
MyTextBox.text=""
>
--
>
David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
>
"JJ297" <nc...@.yahoo.comwrote in message
>
news:1193771080.275874.158090@.y42g2000hsy.googlegr oups.com...
>
>
>

Quote:

Originally Posted by

Could someone help me.


>

Quote:

Originally Posted by

After hitting the submit page how do get the text box to clear? The
page is posting back to itself. What do I put on the code behind page?- Hide quoted text -


>
- Show quoted text -


Thanks I added the text to my code and the box is now clear after
hitting the submit button.
On Oct 30, 3:37 pm, "David Wier" <d...@.dw.comwrote:

Quote:

Originally Posted by

Just add this to your code:
MyTextBox.text=""
>
--
>
David Wierhttp://aspnet101.comhttp://iWritePro.com- One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
>
"JJ297" <nc...@.yahoo.comwrote in message
>
news:1193771080.275874.158090@.y42g2000hsy.googlegr oups.com...
>
>
>

Quote:

Originally Posted by

Could someone help me.


>

Quote:

Originally Posted by

After hitting the submit page how do get the text box to clear? The
page is posting back to itself. What do I put on the code behind page?- Hide quoted text -


>
- Show quoted text -


Thanks it worked!

Text Box and URL

Once I click on the url, it will change to purple color permanetly even i st
op the program and run it again. How to change the url color back to blue co
lor ?
For text box, how to remove the dropdown list 'it's not an asp issue, that's html
<body link=blue vlink=blue>
and as for yout textbox/dropdown list question...It's unclear to me what you
are asking?
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Hong" <anonymous@.discussions.microsoft.com> wrote in message
news:DC295FB3-91C8-44E3-B002-8CFA3C31AF6C@.microsoft.com...
> Once I click on the url, it will change to purple color permanetly even i
stop the program and run it again. How to change the url color back to blue
color ?
> For text box, how to remove the dropdown list '
You can turn off autocomplete for the form or for individual text boxes.
See this article:
http://msdn.microsoft.com/workshop/...omplete_ovr.asp
-Jason
Curt_C [MVP] wrote:

> it's not an asp issue, that's html
> <body link=blue vlink=blue>
> and as for yout textbox/dropdown list question...It's unclear to me what y
ou
> are asking?
>
Use a style or css to set the color of the A element.
Dale
"Hong" <anonymous@.discussions.microsoft.com> wrote in message
news:DC295FB3-91C8-44E3-B002-8CFA3C31AF6C@.microsoft.com...
> Once I click on the url, it will change to purple color permanetly even i
stop the program and run it again. How to change the url color back to blue
color ?
> For text box, how to remove the dropdown list '

Saturday, March 24, 2012

Text Message Data

HI Guys,
I am quite puzzled at the following issue:

I have a .net application linked to SQL database in back end. In database we
have records for clients and their associated Projects.There is a need that
came up and the company wants us to provide SMS based functionality where an
exec can type in keyword on their phone and send it and recieve small
description regarding the client and project on their phone similar to Google
SMS.

Can someone please tell me how this can be done?

Thanks a million in advance.

Manny=?Utf-8?B?TWFubnkgQ2hvaGFu?= <MannyChohan@.discussions.microsoft.com>
wrote in news:044285CD-21E8-492B-8203-0EA9891CB4E3@.microsoft.com:

> I have a .net application linked to SQL database in back end. In
> database we have records for clients and their associated
> Projects.There is a need that came up and the company wants us to
> provide SMS based functionality where an exec can type in keyword on
> their phone and send it and recieve small description regarding the
> client and project on their phone similar to Google SMS.
> Can someone please tell me how this can be done?

Here are a couple options:

1. Easiest - SMS Gateway (google search SMS gateways, ClickATel is one
example).
Gateways allow you to send messages via serveral formats, through
e-mail, web service, sockets, or through SMS messaging protocols

2. Hook a SMS compatible phone to your server and send messages via the
phone using an ActiveX (or .NET) object

3. Interface directly with your mobile phone company's SMS gateway
(IP*Works has such a component)

I would choose option #1... while slightly expensive (about 5 - 10c a
message), you get high reliability and ease of interface.

For SMS to propogate between networks (say for example AT&T and Verizon)
there needs to be a peering contract between the two companies. If there
is no peering, no messages with get through. Large commerical SMS
providers do the peering internally and route the messages to the proper
outbound gateway to ensure delivery.

Couple catches - if you're in North America, many carriers do not
consider SMS to be mission critical... you might notice things from
message slowdowns (takes hours for delivery to occur) to messages
outright disappearing! Also different commerical providers (depending on
where they're located and how their peering is setup) will affect their
delivery times and reliability.

--
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Text Message Data

HI Guys,
I am quite puzzled at the following issue:
I have a .net application linked to SQL database in back end. In database we
have records for clients and their associated Projects.There is a need that
came up and the company wants us to provide SMS based functionality where an
exec can type in keyword on their phone and send it and recieve small
description regarding the client and project on their phone similar to Googl
e
SMS.
Can someone please tell me how this can be done?
Thanks a million in advance.
Mannyexamnotes <MannyChohan@.discussions.microsoft.com>
wrote in news:044285CD-21E8-492B-8203-0EA9891CB4E3@.microsoft.com:

> I have a .net application linked to SQL database in back end. In
> database we have records for clients and their associated
> Projects.There is a need that came up and the company wants us to
> provide SMS based functionality where an exec can type in keyword on
> their phone and send it and recieve small description regarding the
> client and project on their phone similar to Google SMS.
> Can someone please tell me how this can be done?
Here are a couple options:
1. Easiest - SMS Gateway (google search SMS gateways, ClickATel is one
example).
Gateways allow you to send messages via serveral formats, through
e-mail, web service, sockets, or through SMS messaging protocols
2. Hook a SMS compatible phone to your server and send messages via the
phone using an ActiveX (or .NET) object
3. Interface directly with your mobile phone company's SMS gateway
(IP*Works has such a component)
I would choose option #1... while slightly expensive (about 5 - 10c a
message), you get high reliability and ease of interface.
For SMS to propogate between networks (say for example AT&T and Verizon)
there needs to be a peering contract between the two companies. If there
is no peering, no messages with get through. Large commerical SMS
providers do the peering internally and route the messages to the proper
outbound gateway to ensure delivery.
Couple catches - if you're in North America, many carriers do not
consider SMS to be mission critical... you might notice things from
message slowdowns (takes hours for delivery to occur) to messages
outright disappearing! Also different commerical providers (depending on
where they're located and how their peering is setup) will affect their
delivery times and reliability.
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]

Thursday, March 22, 2012

TextBox

I am creating a back office shopping cart where the customer service can take orders over the phone. IN the web application because customer service will be using it so often that I want to give an option of quickly adding rows with 2 empty textboxes. One for Item# or product# and one for quantity with default value 1. On click on the quick add button...it should create 3 rows with each row containing the textboxes I described above. Which is the best approach. is there a sample code I can get from somewhere. I tried lot of online search but no luck. I need help on it fast. Please help.

Two possible approaches. I prefer the first

Option 1. in your layout, add the needed rows, make them actual table rows. you will add runat=server to the rows and give them an id. When you need them to be visible simply do a postback with the add rows button and make them visible when you need them.

If you need to do it without a postback, simply hide / show them using javascript instead of running the <tr> on the server

Option 2

add a placeholder where you need the textboxes to be and then add the textboxes in the code. Here is a sample.

private void AddTextBox(int TextBoxNumber)
{
txtItem = new TextBox();
txtItem.ID = "txtItem" + TextBoxNumber.ToString();
thePlaceHolder.Add(txtItem);
}


I thought about the option 1. But what if the customer service wants to add more records. I don;t want to restrict the textbox instead have them request as they need. I tried using the second option and on the button click I do get 3 rows of text boxes but if I try to click the button again it doesn;t add more textbox after the 3 was already added. Does that make sense? let me know I will try and re phrase the question.


This post shows you how to dynamically add rows to a table server-side:

http://forums.asp.net/thread/1264968.aspx

NC...


You must re-add the controls on each subsequent post-back. To do this, you will need a counter, and you will need a method that will add the number of textboxes in the counter.

example: create a label on the page and set the value = 0 and visible = false. This will be your counter.

create a method that runs in page_load that creates the same number of textboxes in your counter. When you click to add a textbox, increment your counter and add your new text box. Viewstate will still remember the values in the textboxes.


I am really new to this. Could you possibly provide me a sample code. Thanks.


Thanks for the pseudocode. It worked. Now I have another question. ON similar lines to the previous one, How do I create a table or table row with two text boxes in each row (in 2 different columns) based on button click. Any suggestions.

The link that I posted earlier shows exactly how to do that.

NC...


Here is the code sample and it gives me an error on the highlighted code in dark gray , saying "Value of type 'System.Web.UI.WebControls.TableRow' cannot be converted to 'System.Data.DataRow'. Help Please

Id. is the a number that passsed in this function. It is the counter which occurs on the click of the button

------------------

Dim

iAsInteger = 0DoWhile (i < dynamicTable.Rows.Count)Dim dataRowAs DataRow

DataRow = dynamicTable.Rows(i)

Dim newRowAs TableRow =New TableRowDim newCell00As TableCell =New TableCellDim textboxesAsNew TextBox

textboxes.ID =

"ProductId" + Id.ToString()

textboxes.Width = Unit.Pixel(32)

Dim literalControlAsNew LiteralControl

literalControl.Text =

"<p>"

form1.Controls.Add(literalControl)

form1.Controls.Add(textboxes)

Dim newCell01As TableCell =New TableCellDim textboxes1AsNew TextBox

textboxes.ID =

"ITemId" + Id.ToString()

textboxes.Width = Unit.Pixel(32)

Dim literalControl1AsNew LiteralControl

literalControl.Text =

"<p>"

form1.Controls.Add(literalControl)

form1.Controls.Add(textboxes)

newRow.Cells.Add(newCell00)

newRow.Cells.Add(newCell01)

Me.dynamicTable.Rows.Add(newRow)

i = (i + 1)

Loop


Duplicate post -- Please don't do that.

http://forums.asp.net/thread/1264968.aspx

NC...