Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Thursday, March 29, 2012

Newbie: How do I create Dynamic instrument widgets in ASP.NET

Hello,
I want to create a dynamic web page, which presents various instrument
widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
browser, with continous data updates from Server side data. Obviously
these instruments need to be constantly refreshed (every 0.5 second or
so) and not just on page load.
With Windows Forms, and GDI I can do this with networked Thick Client
code. I can also do dynamic web instruments with Java Applets, and I
guess DHTML/Javascript. But I really want to do the instruments in C#
and .NET. But I don't think that I can achieve this, because http and
ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
upon Server side controls, that won't refresh my instruments with live
data, once the page is downloaded. (Traditional DHTML/Javascript looks
like a real pain to develop instruments in.)
I am agreat fan of .NET technologies, but I was hoping for better MS
and .NET support for these instrument based web applications. But I
guess my only real choice is Java Applets !
Any suggestions on how I can achieve dynamic web instruments with .NET
technology would be appreciated.
Thanks
JulesThere may well be other ways of acheiving this kind of thing, but you could
just refresh the image (in JS) representing the clock
or you could use the WebBehaviour stuff, this will allow you to connect to a
webservice on the server (using JS again) then you can update your clock or
gauge or whatever in the JS on the client.
"Jules" <Roseanna80@.hotmail.com> wrote in message
news:80bc211e.0503310335.15a8c492@.posting.google.com...
> Hello,
> I want to create a dynamic web page, which presents various instrument
> widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
> browser, with continous data updates from Server side data. Obviously
> these instruments need to be constantly refreshed (every 0.5 second or
> so) and not just on page load.
> With Windows Forms, and GDI I can do this with networked Thick Client
> code. I can also do dynamic web instruments with Java Applets, and I
> guess DHTML/Javascript. But I really want to do the instruments in C#
> and .NET. But I don't think that I can achieve this, because http and
> ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
> upon Server side controls, that won't refresh my instruments with live
> data, once the page is downloaded. (Traditional DHTML/Javascript looks
> like a real pain to develop instruments in.)
> I am agreat fan of .NET technologies, but I was hoping for better MS
> and .NET support for these instrument based web applications. But I
> guess my only real choice is Java Applets !
> Any suggestions on how I can achieve dynamic web instruments with .NET
> technology would be appreciated.
> Thanks
> Jules
I'd say your requirements don't lend themselves to building a browser based
application. Consider building a traditional fat client app using ClickOnce
or NoTouch Deployment. A java applet is really no different.
-Brock
DevelopMentor
http://staff.develop.com/ballen

> Hello,
> I want to create a dynamic web page, which presents various instrument
> widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
> browser, with continous data updates from Server side data. Obviously
> these instruments need to be constantly refreshed (every 0.5 second or
> so) and not just on page load.
> With Windows Forms, and GDI I can do this with networked Thick Client
> code. I can also do dynamic web instruments with Java Applets, and I
> guess DHTML/Javascript. But I really want to do the instruments in C#
> and .NET. But I don't think that I can achieve this, because http and
> ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
> upon Server side controls, that won't refresh my instruments with live
> data, once the page is downloaded. (Traditional DHTML/Javascript looks
> like a real pain to develop instruments in.)
> I am agreat fan of .NET technologies, but I was hoping for better MS
> and .NET support for these instrument based web applications. But I
> guess my only real choice is Java Applets !
> Any suggestions on how I can achieve dynamic web instruments with .NET
> technology would be appreciated.
> Thanks
> Jules
>

Newbie: How do I create Dynamic instrument widgets in ASP.NET

Hello,

I want to create a dynamic web page, which presents various instrument
widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
browser, with continous data updates from Server side data. Obviously
these instruments need to be constantly refreshed (every 0.5 second or
so) and not just on page load.

With Windows Forms, and GDI I can do this with networked Thick Client
code. I can also do dynamic web instruments with Java Applets, and I
guess DHTML/Javascript. But I really want to do the instruments in C#
and .NET. But I don't think that I can achieve this, because http and
ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
upon Server side controls, that won't refresh my instruments with live
data, once the page is downloaded. (Traditional DHTML/Javascript looks
like a real pain to develop instruments in.)

I am agreat fan of .NET technologies, but I was hoping for better MS
and .NET support for these instrument based web applications. But I
guess my only real choice is Java Applets !

Any suggestions on how I can achieve dynamic web instruments with .NET
technology would be appreciated.

Thanks

JulesThere may well be other ways of acheiving this kind of thing, but you could
just refresh the image (in JS) representing the clock

or you could use the WebBehaviour stuff, this will allow you to connect to a
webservice on the server (using JS again) then you can update your clock or
gauge or whatever in the JS on the client.

"Jules" <Roseanna80@.hotmail.com> wrote in message
news:80bc211e.0503310335.15a8c492@.posting.google.c om...
> Hello,
> I want to create a dynamic web page, which presents various instrument
> widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
> browser, with continous data updates from Server side data. Obviously
> these instruments need to be constantly refreshed (every 0.5 second or
> so) and not just on page load.
> With Windows Forms, and GDI I can do this with networked Thick Client
> code. I can also do dynamic web instruments with Java Applets, and I
> guess DHTML/Javascript. But I really want to do the instruments in C#
> and .NET. But I don't think that I can achieve this, because http and
> ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
> upon Server side controls, that won't refresh my instruments with live
> data, once the page is downloaded. (Traditional DHTML/Javascript looks
> like a real pain to develop instruments in.)
> I am agreat fan of .NET technologies, but I was hoping for better MS
> and .NET support for these instrument based web applications. But I
> guess my only real choice is Java Applets !
> Any suggestions on how I can achieve dynamic web instruments with .NET
> technology would be appreciated.
> Thanks
> Jules
I'd say your requirements don't lend themselves to building a browser based
application. Consider building a traditional fat client app using ClickOnce
or NoTouch Deployment. A java applet is really no different.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> Hello,
> I want to create a dynamic web page, which presents various instrument
> widgets (Temperatures, pressures, rpm gauges, speeds etc.) in a
> browser, with continous data updates from Server side data. Obviously
> these instruments need to be constantly refreshed (every 0.5 second or
> so) and not just on page load.
> With Windows Forms, and GDI I can do this with networked Thick Client
> code. I can also do dynamic web instruments with Java Applets, and I
> guess DHTML/Javascript. But I really want to do the instruments in C#
> and .NET. But I don't think that I can achieve this, because http and
> ASP.NET is based upon a page based paradigm. The new ASP.NEt is based
> upon Server side controls, that won't refresh my instruments with live
> data, once the page is downloaded. (Traditional DHTML/Javascript looks
> like a real pain to develop instruments in.)
> I am agreat fan of .NET technologies, but I was hoping for better MS
> and .NET support for these instrument based web applications. But I
> guess my only real choice is Java Applets !
> Any suggestions on how I can achieve dynamic web instruments with .NET
> technology would be appreciated.
> Thanks
> Jules

Newbie: I need some tips

IDE vs .NET 2003
OS: XP pro sp2

I need to create a asp.net page which will receive data sent to it via
GET... The data sent into the page is a number, this number should be added
together with the numbers sent into the page by other users...

for example:
user A: http://localhost/test.aspx?value=1
and
user B: http://localhost/test.aspx?value=2

if user C want to retrieve this value, he should get the value 3 (1 +2)

Here som of the code in my Global.asax.cs:
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
///
int b;

protected void Application_Start(Object sender, EventArgs e)
{
b ++;
Application.Add("test", b);
}

As you can see from my code above, I'm trying to fix this problem using
HttpApplication... Is that the correct approach? If it isn't, what is the
correct approach then??

JeffUsing Application is fine...but you should be putting it in the
Application_BeginRequest method, or the Page_Load of test.
Application_Start fires once and only once so it'll never add. It's hard to
advise without knowing more in detail. I'd be tempted to scoping this out
to the test.aspx page.

The following code will in no way compile, but should give you a general
idea

page_load
int userInput;
try{
userInput = Int32.Parse(Request.QueryString["value"]);
}catch (Exception ex){
if (!(ex is FormatException) && !(ex is InvalidCastException) && !(ex
is OverflowException))
throw;
}
object o = Application["totalCount"]
if (Application["totalCount"] != null){
((int)Application["totalCount"]) += userInput
}else{
Application["totalCount"] = userInput;
}

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)

"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:%23KAabkfWFHA.3716@.TK2MSFTNGP12.phx.gbl...
> IDE vs .NET 2003
> OS: XP pro sp2
> I need to create a asp.net page which will receive data sent to it via
> GET... The data sent into the page is a number, this number should be
> added
> together with the numbers sent into the page by other users...
> for example:
> user A: http://localhost/test.aspx?value=1
> and
> user B: http://localhost/test.aspx?value=2
> if user C want to retrieve this value, he should get the value 3 (1 +2)
> Here som of the code in my Global.asax.cs:
> public class Global : System.Web.HttpApplication
> {
> /// <summary>
> /// Required designer variable.
> /// </summary>
> ///
> int b;
> protected void Application_Start(Object sender, EventArgs e)
> {
> b ++;
> Application.Add("test", b);
> }
> As you can see from my code above, I'm trying to fix this problem using
> HttpApplication... Is that the correct approach? If it isn't, what is the
> correct approach then??
> Jeff

Newbie: I need some tips

IDE vs .NET 2003
OS: XP pro sp2
I need to create a asp.net page which will receive data sent to it via
GET... The data sent into the page is a number, this number should be added
together with the numbers sent into the page by other users...
for example:
user A: http://localhost/test.aspx?value=1
and
user B: http://localhost/test.aspx?value=2
if user C want to retrieve this value, he should get the value 3 (1 +2)
Here som of the code in my Global.asax.cs:
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
///
int b;
protected void Application_Start(Object sender, EventArgs e)
{
b ++;
Application.Add("test", b);
}
As you can see from my code above, I'm trying to fix this problem using
HttpApplication... Is that the correct approach? If it isn't, what is the
correct approach then'
JeffUsing Application is fine...but you should be putting it in the
Application_BeginRequest method, or the Page_Load of test.
Application_Start fires once and only once so it'll never add. It's hard to
advise without knowing more in detail. I'd be tempted to scoping this out
to the test.aspx page.
The following code will in no way compile, but should give you a general
idea
page_load
int userInput;
try{
userInput = Int32.Parse(Request.QueryString["value"]);
}catch (Exception ex){
if (!(ex is FormatException) && !(ex is InvalidCastException) && !(ex
is OverflowException))
throw;
}
object o = Application["totalCount"]
if (Application["totalCount"] != null){
((int)Application["totalCount"]) += userInput
}else{
Application["totalCount"] = userInput;
}
Karl
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:%23KAabkfWFHA.3716@.TK2MSFTNGP12.phx.gbl...
> IDE vs .NET 2003
> OS: XP pro sp2
> I need to create a asp.net page which will receive data sent to it via
> GET... The data sent into the page is a number, this number should be
> added
> together with the numbers sent into the page by other users...
> for example:
> user A: http://localhost/test.aspx?value=1
> and
> user B: http://localhost/test.aspx?value=2
> if user C want to retrieve this value, he should get the value 3 (1 +2)
> Here som of the code in my Global.asax.cs:
> public class Global : System.Web.HttpApplication
> {
> /// <summary>
> /// Required designer variable.
> /// </summary>
> ///
> int b;
> protected void Application_Start(Object sender, EventArgs e)
> {
> b ++;
> Application.Add("test", b);
> }
> As you can see from my code above, I'm trying to fix this problem using
> HttpApplication... Is that the correct approach? If it isn't, what is the
> correct approach then'
> Jeff
>
>

Saturday, March 24, 2012

Newbie: storing static data within a custom control

Good morning all,
I am an experienced Web programmer, now learning ASP.net 2.0. I am
currently teaching myself how to create a custom control. I have the
control designed and it renders beautifully. The only problem I have
is that I would like to store some static data in this control. The
control is an address control and it has a dropdown for the state.
Since state names are static, it seems to me to be best practice to
store the names within the control. So, question #1 is: Is that truly
best practice?
If it is best practice, question #2a: Is there any advantage to storing
the data as an array and having the control loop as it renders versus
hardcoding all the renders for the <option> tags?
If it is NOT best practice, question #2b: What is the recommended
alternative?
As always, any ideas, resources, references, war stories, or good clean
jokes would be greatly appreciated.
Thanks,
KathrynHard-coding the states into the HTML is a perfectly acceptible way to do it.
Its only 100 characters, anyhow (not including tags).
Best practices would dictate that this is bad, because it is not localizable
(globalizable? Ironic that you make something globally accessible by making
it localizable). But if your web app isn't designed from the start to be
localizable, who cares? It takes a tremendous amount of effort to
internationalize your application; but if that isn't in the scope of the app
,
then stick it in the HTML and be happy you don't have to learn how they do
mailing addresses in Zimbabwe.
"kbutterly" wrote:

> Good morning all,
> I am an experienced Web programmer, now learning ASP.net 2.0. I am
> currently teaching myself how to create a custom control. I have the
> control designed and it renders beautifully. The only problem I have
> is that I would like to store some static data in this control. The
> control is an address control and it has a dropdown for the state.
> Since state names are static, it seems to me to be best practice to
> store the names within the control. So, question #1 is: Is that truly
> best practice?
> If it is best practice, question #2a: Is there any advantage to storing
> the data as an array and having the control loop as it renders versus
> hardcoding all the renders for the <option> tags?
> If it is NOT best practice, question #2b: What is the recommended
> alternative?
> As always, any ideas, resources, references, war stories, or good clean
> jokes would be greatly appreciated.
> Thanks,
> Kathryn

Newbie: storing static data within a custom control

Good morning all,

I am an experienced Web programmer, now learning ASP.net 2.0. I am
currently teaching myself how to create a custom control. I have the
control designed and it renders beautifully. The only problem I have
is that I would like to store some static data in this control. The
control is an address control and it has a dropdown for the state.
Since state names are static, it seems to me to be best practice to
store the names within the control. So, question #1 is: Is that truly
best practice?

If it is best practice, question #2a: Is there any advantage to storing
the data as an array and having the control loop as it renders versus
hardcoding all the renders for the <optiontags?

If it is NOT best practice, question #2b: What is the recommended
alternative?

As always, any ideas, resources, references, war stories, or good clean
jokes would be greatly appreciated.

Thanks,
KathrynWilliam,

Thanks, that makes sense.

Have a good week,
Kathryn

William Sullivan wrote:

Quote:

Originally Posted by

Hard-coding the states into the HTML is a perfectly acceptible way to do it.
Its only 100 characters, anyhow (not including tags).
>
Best practices would dictate that this is bad, because it is not localizable
(globalizable? Ironic that you make something globally accessible by making
it localizable). But if your web app isn't designed from the start to be
localizable, who cares? It takes a tremendous amount of effort to
internationalize your application; but if that isn't in the scope of the app,
then stick it in the HTML and be happy you don't have to learn how they do
mailing addresses in Zimbabwe.
>
"kbutterly" wrote:
>

Quote:

Originally Posted by

Good morning all,

I am an experienced Web programmer, now learning ASP.net 2.0. I am
currently teaching myself how to create a custom control. I have the
control designed and it renders beautifully. The only problem I have
is that I would like to store some static data in this control. The
control is an address control and it has a dropdown for the state.
Since state names are static, it seems to me to be best practice to
store the names within the control. So, question #1 is: Is that truly
best practice?

If it is best practice, question #2a: Is there any advantage to storing
the data as an array and having the control loop as it renders versus
hardcoding all the renders for the <optiontags?

If it is NOT best practice, question #2b: What is the recommended
alternative?

As always, any ideas, resources, references, war stories, or good clean
jokes would be greatly appreciated.

Thanks,
Kathryn

Newbie: switch control

I try to create a switch control, but I'm hitting a problem, changing the
switch value with button in the page (below failig test code).
I know in this test case I could create an extra variable and use it, my
problem is the switch, i my real problem is in a repeater, hence I cannot
use a property!
how to change the label of the galador:Switch?
--
<script runat="server">
void OnSwapSwitch(object sender, EventArgs e)
{
switch (mySwitch.Value)
{
case "0":
mySwitch.Value = "1";
break;
default:
mySwitch.Value = "0";
break;
}
}
</script>
<galador:Switch id=mySwitch runat=server Value=1 >
<galador:SwitchCase runat=server label=0>
Azerty
<asp:LinkButton ID="LinkButton1" Runat=server
OnClick=OnSwapSwitch >Clic
Clac</asp:LinkButton>
</galador:SwitchCase>
<galador:SwitchCase runat=server label=1>
Qwerty
<asp:LinkButton ID="LinkButton2" Runat=server
OnClick=OnSwapSwitch >Kodak</asp:LinkButton>
</galador:SwitchCase>
</galador:Switch>Have you tried to databind your value to some variable? For example, when
you switch, in your back-end code, if you set some variable ( string MyVar =
"";), then do a Page.DataBind(), then you can access it in your ascx/aspx
code using something like this... <galador:SwitchCase runat=server
label="<%= MyVar %>">
Would that work for you?
Alex
"Lloyd Dupont" <ld@.NewsAccount.galador.net> wrote in message
news:uxC$yS%23wEHA.3416@.TK2MSFTNGP09.phx.gbl...
> I try to create a switch control, but I'm hitting a problem, changing the
> switch value with button in the page (below failig test code).
> I know in this test case I could create an extra variable and use it, my
> problem is the switch, i my real problem is in a repeater, hence I cannot
> use a property!
> how to change the label of the galador:Switch?
> --
> <script runat="server">
> void OnSwapSwitch(object sender, EventArgs e)
> {
> switch (mySwitch.Value)
> {
> case "0":
> mySwitch.Value = "1";
> break;
> default:
> mySwitch.Value = "0";
> break;
> }
> }
> </script>
> <galador:Switch id=mySwitch runat=server Value=1 >
> <galador:SwitchCase runat=server label=0>
> Azerty
> <asp:LinkButton ID="LinkButton1" Runat=server
> OnClick=OnSwapSwitch >Clic
> Clac</asp:LinkButton>
> </galador:SwitchCase>
> <galador:SwitchCase runat=server label=1>
> Qwerty
> <asp:LinkButton ID="LinkButton2" Runat=server
> OnClick=OnSwapSwitch >Kodak</asp:LinkButton>
> </galador:SwitchCase>
> </galador:Switch>
>
well, I guess I will have too...
but what I wonder is, my switch is in a repeater, how could I store the
value in a variable?
"Alex" <Alex@.donotemailme.com> wrote in message
news:uE1nVCGxEHA.1984@.TK2MSFTNGP14.phx.gbl...
> Have you tried to databind your value to some variable? For example, when
> you switch, in your back-end code, if you set some variable ( string MyVar
> =
> "";), then do a Page.DataBind(), then you can access it in your ascx/aspx
> code using something like this... <galador:SwitchCase runat=server
> label="<%= MyVar %>">
> Would that work for you?
> --
> Alex
> "Lloyd Dupont" <ld@.NewsAccount.galador.net> wrote in message
> news:uxC$yS%23wEHA.3416@.TK2MSFTNGP09.phx.gbl...
>

Newbie: switch control

I try to create a switch control, but I'm hitting a problem, changing the
switch value with button in the page (below failig test code).

I know in this test case I could create an extra variable and use it, my
problem is the switch, i my real problem is in a repeater, hence I cannot
use a property!

how to change the label of the galador:Switch?
----------
<script runat="server">
void OnSwapSwitch(object sender, EventArgs e)
{
switch (mySwitch.Value)
{
case "0":
mySwitch.Value = "1";
break;
default:
mySwitch.Value = "0";
break;
}
}
</script
<galador:Switch id=mySwitch runat=server Value=1
<galador:SwitchCase runat=server label=0>
Azerty
<asp:LinkButton ID="LinkButton1" Runat=server
OnClick=OnSwapSwitch >Clic
Clac</asp:LinkButton>
</galador:SwitchCase
<galador:SwitchCase runat=server label=1>
Qwerty
<asp:LinkButton ID="LinkButton2" Runat=server
OnClick=OnSwapSwitch >Kodak</asp:LinkButton>
</galador:SwitchCase
</galador:SwitchHave you tried to databind your value to some variable? For example, when
you switch, in your back-end code, if you set some variable ( string MyVar =
"";), then do a Page.DataBind(), then you can access it in your ascx/aspx
code using something like this... <galador:SwitchCase runat=server
label="<%= MyVar %>"
Would that work for you?

--
Alex

"Lloyd Dupont" <ld@.NewsAccount.galador.net> wrote in message
news:uxC$yS%23wEHA.3416@.TK2MSFTNGP09.phx.gbl...
> I try to create a switch control, but I'm hitting a problem, changing the
> switch value with button in the page (below failig test code).
> I know in this test case I could create an extra variable and use it, my
> problem is the switch, i my real problem is in a repeater, hence I cannot
> use a property!
> how to change the label of the galador:Switch?
> ----------
> <script runat="server">
> void OnSwapSwitch(object sender, EventArgs e)
> {
> switch (mySwitch.Value)
> {
> case "0":
> mySwitch.Value = "1";
> break;
> default:
> mySwitch.Value = "0";
> break;
> }
> }
> </script>
> <galador:Switch id=mySwitch runat=server Value=1 >
> <galador:SwitchCase runat=server label=0>
> Azerty
> <asp:LinkButton ID="LinkButton1" Runat=server
> OnClick=OnSwapSwitch >Clic
> Clac</asp:LinkButton>
> </galador:SwitchCase>
> <galador:SwitchCase runat=server label=1>
> Qwerty
> <asp:LinkButton ID="LinkButton2" Runat=server
> OnClick=OnSwapSwitch >Kodak</asp:LinkButton>
> </galador:SwitchCase>
> </galador:Switch>
well, I guess I will have too...
but what I wonder is, my switch is in a repeater, how could I store the
value in a variable?

"Alex" <Alex@.donotemailme.com> wrote in message
news:uE1nVCGxEHA.1984@.TK2MSFTNGP14.phx.gbl...
> Have you tried to databind your value to some variable? For example, when
> you switch, in your back-end code, if you set some variable ( string MyVar
> =
> "";), then do a Page.DataBind(), then you can access it in your ascx/aspx
> code using something like this... <galador:SwitchCase runat=server
> label="<%= MyVar %>">
> Would that work for you?
> --
> Alex
> "Lloyd Dupont" <ld@.NewsAccount.galador.net> wrote in message
> news:uxC$yS%23wEHA.3416@.TK2MSFTNGP09.phx.gbl...
>> I try to create a switch control, but I'm hitting a problem, changing the
>> switch value with button in the page (below failig test code).
>>
>> I know in this test case I could create an extra variable and use it, my
>> problem is the switch, i my real problem is in a repeater, hence I cannot
>> use a property!
>>
>> how to change the label of the galador:Switch?
>> ----------
>> <script runat="server">
>> void OnSwapSwitch(object sender, EventArgs e)
>> {
>> switch (mySwitch.Value)
>> {
>> case "0":
>> mySwitch.Value = "1";
>> break;
>> default:
>> mySwitch.Value = "0";
>> break;
>> }
>> }
>> </script>
>>
>> <galador:Switch id=mySwitch runat=server Value=1 >
>>
>> <galador:SwitchCase runat=server label=0>
>> Azerty
>> <asp:LinkButton ID="LinkButton1" Runat=server
>> OnClick=OnSwapSwitch >Clic
>> Clac</asp:LinkButton>
>> </galador:SwitchCase>
>>
>> <galador:SwitchCase runat=server label=1>
>> Qwerty
>> <asp:LinkButton ID="LinkButton2" Runat=server
>> OnClick=OnSwapSwitch >Kodak</asp:LinkButton>
>> </galador:SwitchCase>
>>
>> </galador:Switch>
>>
>>

Newbie: Tables in ASP

Hi,

I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.

Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.

Many thanks for any help with this in advance

Anthi im using VS 2005
i used to only use text to design tables
but having to use ajax, wizard controls etc.. being a lazy bum, i just
use VS' wysiwyg designer.
yeah it is easy, add rows, columns, merge cells, etc... simpler and
more reliable then dreamweaver.
it is under HTML tab of the controls toolbar

On Sep 17, 9:40 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,


Quote:

Originally Posted by

>
I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.
>
Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.
>
Many thanks for any help with this in advance
>
Ant


Hi Nick,

That sounds promising. Could you spoon feed me to find where the Controls
tool bar is. I just can't seem to find it.

Many thanks for your reply!

Anthony

"Nick Chan" wrote:

Quote:

Originally Posted by

hi im using VS 2005
i used to only use text to design tables
but having to use ajax, wizard controls etc.. being a lazy bum, i just
use VS' wysiwyg designer.
yeah it is easy, add rows, columns, merge cells, etc... simpler and
more reliable then dreamweaver.
it is under HTML tab of the controls toolbar
>
On Sep 17, 9:40 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,


>

Quote:

Originally Posted by


I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.

Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.

Many thanks for any help with this in advance

Ant


>
>
>


hi, when u switch to designer mode, u should see the Toolbox on the
left. if not go to View Toolbox
under HTML section, u should see a Table control

On Sep 17, 10:52 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi Nick,
>
That sounds promising. Could you spoon feed me to find where the Controls
tool bar is. I just can't seem to find it.
>
Many thanks for your reply!
>
Anthony
>
>
>
"Nick Chan" wrote:

Quote:

Originally Posted by

hi im using VS 2005
i used to only use text to design tables
but having to use ajax, wizard controls etc.. being a lazy bum, i just
use VS' wysiwyg designer.
yeah it is easy, add rows, columns, merge cells, etc... simpler and
more reliable then dreamweaver.
it is under HTML tab of the controls toolbar


>

Quote:

Originally Posted by

On Sep 17, 9:40 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,


>

Quote:

Originally Posted by

Quote:

Originally Posted by

I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Many thanks for any help with this in advance


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Ant- Hide quoted text -


>
- Show quoted text -


Look at that! Wonderful!

Thank you very much Nick, you've been a great help to this dazed & confused
newbie!

Much appreciated!

Ant

"Nick Chan" wrote:

Quote:

Originally Posted by

hi, when u switch to designer mode, u should see the Toolbox on the
left. if not go to View Toolbox
under HTML section, u should see a Table control
>
On Sep 17, 10:52 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi Nick,

That sounds promising. Could you spoon feed me to find where the Controls
tool bar is. I just can't seem to find it.

Many thanks for your reply!

Anthony

"Nick Chan" wrote:

Quote:

Originally Posted by

hi im using VS 2005
i used to only use text to design tables
but having to use ajax, wizard controls etc.. being a lazy bum, i just
use VS' wysiwyg designer.
yeah it is easy, add rows, columns, merge cells, etc... simpler and
more reliable then dreamweaver.
it is under HTML tab of the controls toolbar


Quote:

Originally Posted by

On Sep 17, 9:40 am, Ant <A...@.discussions.microsoft.comwrote:
Hi,


Quote:

Originally Posted by

I'm a newbie to ASP.NET. I've used notepad HTML without issues creating
tables, but using ASP to create tables graphicaly, I can't seem to get them
to work.


Quote:

Originally Posted by

Is it best to design tables graphically in VS or using the "source" page? Is
there a way to design WYSIWYG in VS so that you can drop a table onto the
form then drag it to the width & height you desire? This I guess is what I'm
expecting to be available in VS.


Quote:

Originally Posted by

Many thanks for any help with this in advance


Quote:

Originally Posted by

Ant- Hide quoted text -


- Show quoted text -


>
>
>

newbie: Table position

Hi,

Using the IDE, I create a nested table within another. I set its position by
setting the style to Absolutely, but when I set it back to normal flow, it
doesn't return to the top left of the cell in which it is nested as would be
expected. So I changed the style position to "Not Set" but the nested table
refuses to return to the top left.

There is no padding set.

Is this some known issue? Am I doing something wrong?

Any suggestions would be a great help

Many thanks in advance
antOn Oct 6, 4:58 am, Ant <A...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

Hi,
>
Using the IDE, I create a nested table within another. I set its position by
setting the style to Absolutely, but when I set it back to normal flow, it
doesn't return to the top left of the cell in which it is nested as would be
expected. So I changed the style position to "Not Set" but the nested table
refuses to return to the top left.
>
There is no padding set.
>
Is this some known issue? Am I doing something wrong?
>
Any suggestions would be a great help
>
Many thanks in advance
ant


Switch to the html mode and check what code do you have in the cell.

Friday, March 16, 2012

news form!

Is there anyone know or have an example to create news form, help me!!! Thank first!!!Thank you.

What is a news form?
news form is form for news.
Google is your friend. :bigyello:

http://www.google.com/search?hs=0GV&hl=en&lr=&safe=active&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial_s&q=Programming+ASP.Net+%22News+form%22&btnG=Search

News Ticker

Hi All

I want to create a news ticker for my site which I'm developing using ASP.NET. This news ticker shows the latest news that I'm going to store on regular basis in my DB. How ever I would like to know how i can create a news ticker control using ASP.NET

If anybody can provide me with the source I would be thankful.Has anyone found an answer to this one as I have been searching for over a week now. All I want to do is scroll text out like on the bbc news website.
http://www.google.com/search?q=javascript+bbc+news+ticker&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
Thanks Mendhak, I can always rely on you. Just need to go through the code now to sort out how it works. Will look at an e-learning CD I have on Javascript first. Thanks again mate!
There really isn't a lot to learn on Javascript. My advice is, the best way is to practice, practice, you start picking things up automatically after that.
Cheers mate!

Newsletter

How to create newsletter in asp.net 2.0?
How to manage email list?
how can user subscribe and unsubscribe?

Hi,
- all kinds of questions about emailing from .NET can be found here:http://www.systemwebmail.com.
- to manage a list of subscribers you could use a webform with a grid on it.
- you can have a page where a person can subscribe. In ASP.NET 2.0 the CreateUserWizard would be a nice control to take a look at for this purpose. After that you can send a confirmation email to make sure that the person who subscribed really owns that emailaddress.
Grz, Kris.


is it possible to create newsletter using any html editor and use that page in your asp.net so that you dont have to write all the html code in asp.net.


Hi,
you could that,read it out using a streamreader and use it to fill up the body of the mail message. Another way could be that you use atext editor like where you type in your questions on this forum and save it into a database. It seems handier to me to do so because you don't have to make up any html and upload it to a server.
Grz, Kris.
That helps. you have any example I can check online.
Hi,
you want an example for...?
If you want to put something into a database you'll be needingADO.NET. The freetextbox I mentioned in my previous post is a free webcontrol that you can download and use. The link to the "reading text from a file" in my previous post shows you how to use the StreamReader class to read from a file.
Grz, Kris.
I tried the below code and it just sends me an blank email. newsletter.htm is a html page with simple newsletter. I also had to put full path for this. I tried "./images/newsletter.htm" and it ended up with error ( cannot find newsletter.htm in c:\windows\system32).
What am I doing wrong here?
Private Const FILE_NAME As String = "C:\Inetpub\wwwroot\Intranet\images\newsletter.htm"
Dim email As MailMessage
If Not File.Exists(FILE_NAME) Then
Console.WriteLine("{0} does not exist.", FILE_NAME)
Return
End If
Dim sr As StreamReader = File.OpenText(FILE_NAME)
Dim input As String
input = sr.ReadLine()
Dim strnews As String
SmtpMail.SmtpServer = "localhost"
email = New MailMessage
email.BodyFormat = MailFormat.Html
email.From =emailme@.email.com
email.To = ("emailme@.email.com")
email.Subject = "News Letter"
While Not input Is Nothing
input = sr.ReadLine()
strnews = input
End While

Hi,
at first glance you missed a property of the MailMessage class:Body. Besides that your code doesn't seem quite clean to me.

While Not input Is Nothing
input = sr.ReadLine()
strnews = input
End While
Why do you assign a string to another string? Also it would be better to write it like this:
strnews += input so you concatenate the strings, now you're just simply replacing them.
Another thing, and even more important, is the fact that you use simple strings to concatenate. This can be done as long as the concatenating doesn't take more than 5 times. Because a string is immutable, every time you concatenate a new string is created. So it's better to use aStringBuilder instance in this case.
So it would be more like this:

Dim sr As StreamReader = File.OpenText(FILE_NAME)
Dim input As New StringBuilder()
SmtpMail.SmtpServer = "localhost"
email = New MailMessage
email.BodyFormat = MailFormat.Html
email.From = emailme@.email.com
email.To = ("emailme@.email.com")
email.Subject = "News Letter"
String strNews
Do strNews = sr.ReadLine()
input.Append(strNews)
Loop Until line Is Nothing
sr.Close()
email.Body = input.ToString()
This code isn't tested and I didn't have any coffee yet.
Grz, Kris.


Hi
Prevent potentially dangerous HTML Tags:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000004.asp
Regards

I want to start with a simple newsletter. First step I want to send out and HTML page. When I try that, it does not display any pictures when viewed in email. Any better way to work on this.
Dim strnewsAsString

SmtpMail.SmtpServer = "w2k3-exch1.360incliv.com"

email =New MailMessage

email.BodyFormat = MailFormat.Html

email.From = "bpatel@.360inc.com"

email.To = ("bpatel@.360inc.com")

email.Subject = "News Letter"

Dim attachmentAsNew MailAttachment(Server.MapPath("newsletter.htm"))'create the attachment

email.Attachments.Add(attachment)'add the attachment

SmtpMail.Send(email)