473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Custom Server Control Nightmare

I am building a custom control that builds on the Textarea html control. I
have attached a toolbar on top of the Textarea that allows the creation of
buttons that will give the designer(during design-time) the ability to add or
remove buttons and their associated functions. These function associated
with the buttons are all client side programming because the round trip to
perform such things as making text bold would be impractical. Now, the
problem I am having, because these buttons rely on client side functions I
don't need a postback or round trip to the server. Nevertheless, when
pressed the button still posts back to the server and subsequently erases the
text in textarea. Am I going to have to set postback to false in the
server-control or do I have to rely on javascript to format the text during
the round trip and return the information based on the buttons instructions?
Nov 19 '05 #1
3 1253
Hi I Am Sam,

Unless there is some reason for you to use a Server Control, I would suggest
using a plain vanilla HTML button. Otherwise, yes, you will have to set the
IsPostBack to false.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"I am Sam" <Ia****@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...
I am building a custom control that builds on the Textarea html control. I
have attached a toolbar on top of the Textarea that allows the creation of
buttons that will give the designer(during design-time) the ability to add
or
remove buttons and their associated functions. These function associated
with the buttons are all client side programming because the round trip to
perform such things as making text bold would be impractical. Now, the
problem I am having, because these buttons rely on client side functions I
don't need a postback or round trip to the server. Nevertheless, when
pressed the button still posts back to the server and subsequently erases
the
text in textarea. Am I going to have to set postback to false in the
server-control or do I have to rely on javascript to format the text
during
the round trip and return the information based on the buttons
instructions?

Nov 19 '05 #2
Hi Kevin Spencer.

Funny thing is that I have used a simple HTML Button:

<input type="image" src="somedirectory" onClick="Whatever_Client_Event" />

It still posts back for some reason.

"Kevin Spencer" wrote:
Hi I Am Sam,

Unless there is some reason for you to use a Server Control, I would suggest
using a plain vanilla HTML button. Otherwise, yes, you will have to set the
IsPostBack to false.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"I am Sam" <Ia****@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...
I am building a custom control that builds on the Textarea html control. I
have attached a toolbar on top of the Textarea that allows the creation of
buttons that will give the designer(during design-time) the ability to add
or
remove buttons and their associated functions. These function associated
with the buttons are all client side programming because the round trip to
perform such things as making text bold would be impractical. Now, the
problem I am having, because these buttons rely on client side functions I
don't need a postback or round trip to the server. Nevertheless, when
pressed the button still posts back to the server and subsequently erases
the
text in textarea. Am I going to have to set postback to false in the
server-control or do I have to rely on javascript to format the text
during
the round trip and return the information based on the buttons
instructions?


Nov 19 '05 #3
Hi I Am Sam,

You can call me Kevin. ;-)

An Image input element is a form element that works like a Sumbit button.
Use a regular image instead.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"I am Sam" <Ia****@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
Hi Kevin Spencer.

Funny thing is that I have used a simple HTML Button:

<input type="image" src="somedirectory" onClick="Whatever_Client_Event"
/>

It still posts back for some reason.

"Kevin Spencer" wrote:
Hi I Am Sam,

Unless there is some reason for you to use a Server Control, I would
suggest
using a plain vanilla HTML button. Otherwise, yes, you will have to set
the
IsPostBack to false.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"I am Sam" <Ia****@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...
>I am building a custom control that builds on the Textarea html control.
>I
> have attached a toolbar on top of the Textarea that allows the creation
> of
> buttons that will give the designer(during design-time) the ability to
> add
> or
> remove buttons and their associated functions. These function
> associated
> with the buttons are all client side programming because the round trip
> to
> perform such things as making text bold would be impractical. Now, the
> problem I am having, because these buttons rely on client side
> functions I
> don't need a postback or round trip to the server. Nevertheless, when
> pressed the button still posts back to the server and subsequently
> erases
> the
> text in textarea. Am I going to have to set postback to false in the
> server-control or do I have to rely on javascript to format the text
> during
> the round trip and return the information based on the buttons
> instructions?


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wannabe_Geek | last post by:
Hi Iam new to MS .Net technology just getting along with it....I created a custom control ,which takes in a query and displays the data in a tabular format....something similar to a datagrid. ...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
1
by: Sam Samnah | last post by:
Hi Everyone. It has been a long time since my last post. Nevertheless, I have built a custom server control that allows a user to edit text, bolding, italics strike though table insertion and...
4
by: DKode | last post by:
I have developed a custom server control that displays a login page that authenticates against AD. The server control works fine, but now I am trying to figure out the best way to output custom...
5
by: Alan Silver | last post by:
Hello, I have a products page that takes a product ID in the query string. Based on the product details (from a database), the page then loads up one of a number of custom controls, calls a...
11
by: Nick Gilbert | last post by:
Hi, How can I create a custom control which will wrap its content in a header and footer? eg: Is it possible to create a .NET user control which can surround other controls? eg:...
2
by: Michal Valent | last post by:
I would like to fire some custom server control event before Page_Load event like this (from the trace of an aspx page) : Trace Information Category Message From First(s) From Last(s) aspx.page...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
4
by: Jeff | last post by:
hi asp.net 2.0 I have created a custom web control, here is it's header: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="EditUserBox.ascx.cs" Inherits="Controls_EditUserBox" %> ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.