Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Saturday, March 31, 2012

Theming custom created WebParts in ASP.NET 2.0

I have created my own WebPart using code, it is not derived from a UserControl.
Inside this WebPart I create a Calendar Control and add it to the WebParts
Control collection.

Now I want to apply a theme to this Calendar that is inside my WebPart. How
do I do that? I have created a theme and added a definition for a calendar.
The theme is applied to a calendar that is not inside the WebPart, but it is
not applied to the one inside.Hi c_kimbell,

Welcome to MSDN newsgroup.
As for the custom WebPart with a Calendar inside it, is it possible that we
define a public property on the Custom webPart which represent the Theme of
the inside Calendar control? Then, we any one assign a new value for this
property, the nested calendar's Theme value will be changed accordingly.

In addition, for .NET 2.0 and VS.NET whidbey beta issues, I suggest you
also try posting in the following web forum:

http://forums.microsoft.com/msdn/

since there are some other experienced members who may have some good ideas.

Thank you,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Thanks for suggesting the ASP.NET forums, I have posted there now as well.

Here are some more details on what I have tried;
1. On the webpart I have exposed the Calendar as a property with the name
FromCalendar.
2. I have added the following to the .skin file

<%@. Register Assembly="IMK.WebParts" Namespace="IMK.WebParts"
TagPrefix="IMK" %
<IMK:IMKDateWebPart runat="server">
<FromCalendar BackColor="#FFFFCC">
<SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
<TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt"
ForeColor="#FFFFCC" />
</FromCalendar>
</IMK:IMKDateWebPart
Am I on the right track?

"Steven Cheng[MSFT]" wrote:

> Hi c_kimbell,
> Welcome to MSDN newsgroup.
> As for the custom WebPart with a Calendar inside it, is it possible that we
> define a public property on the Custom webPart which represent the Theme of
> the inside Calendar control? Then, we any one assign a new value for this
> property, the nested calendar's Theme value will be changed accordingly.
> In addition, for .NET 2.0 and VS.NET whidbey beta issues, I suggest you
> also try posting in the following web forum:
> http://forums.microsoft.com/msdn/
> since there are some other experienced members who may have some good ideas.
> Thank you,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi c_kimbell,

Thanks for your followup.
As you mentioned that
=================

1. On the webpart I have exposed the Calendar as a property with the name
FromCalendar.
2. I have added the following to the .skin file

<%@. Register Assembly="IMK.WebParts" Namespace="IMK.WebParts"
TagPrefix="IMK" %
<IMK:IMKDateWebPart runat="server">
<FromCalendar BackColor="#FFFFCC">
<SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
<TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt"
ForeColor="#FFFFCC" />
</FromCalendar>
</IMK:IMKDateWebPart>
=======================

I'm not sure whether this will cause error since I haven't tested it.
However, IMO, I'd prefer expose a single string property on my custom web
control which represent the nested child calendar's Theme(or
stylesheettheme). Since the ASP.NET 2.0 's Theme are mostly for those
simple type properteis (such as string, int), I think just exposing a
single string type property will be much better). You can do the actual
Theme adjusting in the Property's Setter method.
How do you think ?

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
I get your point about using simple strings. One thing though, say you expose
a color, this can be specified using a name like 'Red' or it may be specified
using hex notation, like '#FFCC66'. The controls require a Color object, how
does one map between the different representations and the Color object. Are
there any utility classes I can use?

I have now done a bit more experimenting. If I declaratively add the webpart
to a webpartzone, then the theme is correctly applied. If I add the same
webpart to the zone using a catalog, the style is not applied. The catalog
I'm adding from is a custom created one, not one of the predefined types.

Any suggestions?

"Steven Cheng[MSFT]" wrote:

> Hi c_kimbell,
> Thanks for your followup.
> As you mentioned that
> =================
>
> 1. On the webpart I have exposed the Calendar as a property with the name
> FromCalendar.
> 2. I have added the following to the .skin file
> <%@. Register Assembly="IMK.WebParts" Namespace="IMK.WebParts"
> TagPrefix="IMK" %>
> <IMK:IMKDateWebPart runat="server">
> <FromCalendar BackColor="#FFFFCC">
> <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
> <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt"
> ForeColor="#FFFFCC" />
> </FromCalendar>
> </IMK:IMKDateWebPart>
> =======================
> I'm not sure whether this will cause error since I haven't tested it.
> However, IMO, I'd prefer expose a single string property on my custom web
> control which represent the nested child calendar's Theme(or
> stylesheettheme). Since the ASP.NET 2.0 's Theme are mostly for those
> simple type properteis (such as string, int), I think just exposing a
> single string type property will be much better). You can do the actual
> Theme adjusting in the Property's Setter method.
> How do you think ?
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi c_kimbell,

For those Color field, the ASP.NET runtime's ControlParser will help parse
the property value into the correct object instance. And for Color, there
is the ColorTranslator class which can be used from convert string color
value to System.Drawing.Color instance. For example:

string htmlColor = "Blue";
//or string htmlColor = "#3344ee";
// Translate htmlColor to a GDI+ Color structure.
Color myColor = ColorTranslator.FromHtml(htmlColor);

For the applying theme for custom created catalog's webpart, I'm not sure
whether this is ok. As far as I know, since the ASP.NET2.0 runtime apply
theme for controls in the page's PreInit event, so any change on Theme
after that event (for example in Page_load ..., post back event) will not
work in the first loading...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

There is a bug concerning SSL and ASP.Net 2.0 Menu Control

Hi all

It appears there is a bug - when using a 2 or more tier menu control in
asp.net in an SSL environment you get prompted with the:

"This page contains both secure and non-secure items blah blah"

a) has anyone else experienced?

b) if so do we know when to expect it to be fixed?

Thanks
KevMantorok wrote:
> Hi all
> It appears there is a bug - when using a 2 or more tier menu control in
> asp.net in an SSL environment you get prompted with the:
> "This page contains both secure and non-secure items blah blah"

Have you looked at the generated HTML to see if there is a mistake that
you made? I haven't used this control in an SSL environment yet so I'm
only speculating.

Good luck,

--
Sean
"Fao, Sean" <enceladus311@.yahoo.comI-WANT-NO-SPAM> wrote in message
news:ubV70OfFGHA.1288@.TK2MSFTNGP09.phx.gbl...
> Mantorok wrote:
>> Hi all
>>
>> It appears there is a bug - when using a 2 or more tier menu control in
>> asp.net in an SSL environment you get prompted with the:
>>
>> "This page contains both secure and non-secure items blah blah"
> Have you looked at the generated HTML to see if there is a mistake that
> you made? I haven't used this control in an SSL environment yet so I'm
> only speculating.

Yep I've checked, I've used relative paths in my links.

Kev
"Mantorok" <mantorok@.mantorok.com> wrote in message
news:dq0h62$nmc$1@.newsfeed.th.ifl.net...

> Yep I've checked, I've used relative paths in my links.

Do any of the links point to resources in non-SSL locations? If so, you will
get the message box by default when you access an SSL page which contains
links to non-SSL resources.
"Mark Rae" <mark@.markN-O-S-P-A-M.co.uk> wrote in message
news:Oub62lfFGHA.1676@.TK2MSFTNGP09.phx.gbl...
> "Mantorok" <mantorok@.mantorok.com> wrote in message
> news:dq0h62$nmc$1@.newsfeed.th.ifl.net...
>> Yep I've checked, I've used relative paths in my links.
> Do any of the links point to resources in non-SSL locations? If so, you
> will get the message box by default when you access an SSL page which
> contains links to non-SSL resources.

Yes there are links in the master page that link back to non-secure sites -
does that really make a difference? Sounds odd if it does.

Kev
"Mantorok" <mantorok@.mantorok.com> wrote in message
news:dq0lgl$q9r$1@.newsfeed.th.ifl.net...

> Yes there are links in the master page that link back to non-secure
> sites -

There's your problem...

> does that really make a difference?

Yes.

> Sounds odd if it does.

Perfectly logical if you think about it...
"Mark Rae" <mark@.markN-O-S-P-A-M.co.uk> wrote in message
news:eGZYZCgFGHA.1676@.TK2MSFTNGP09.phx.gbl...
> "Mantorok" <mantorok@.mantorok.com> wrote in message
> news:dq0lgl$q9r$1@.newsfeed.th.ifl.net...
>> Yes there are links in the master page that link back to non-secure
>> sites -
> There's your problem...
>> does that really make a difference?
> Yes.
>> Sounds odd if it does.
> Perfectly logical if you think about it...

Wait a minute - do you mean hyperlinks or just linking to non-secure stuff,
if you mean the latter then no, but the former - yes.

Kev
most likely you are referencing an image over http. the easiest way to find
the reference is to use firefox, and goto to the media tab on the pageinfo,
you will see the http reference.

-- bruce (sqlwork.com)

"Mantorok" <mantorok@.mantorok.com> wrote in message
news:dq0gjm$nbo$1@.newsfeed.th.ifl.net...
> Hi all
> It appears there is a bug - when using a 2 or more tier menu control in
> asp.net in an SSL environment you get prompted with the:
> "This page contains both secure and non-secure items blah blah"
> a) has anyone else experienced?
> b) if so do we know when to expect it to be fixed?
> Thanks
> Kev
"Mantorok" <mantorok@.mantorok.com> wrote in message
news:dq0nd6$rbg$1@.newsfeed.th.ifl.net...

> Wait a minute - do you mean hyperlinks or just linking to non-secure
> stuff, if you mean the latter then no, but the former - yes.

Either; both; whatever - that's the way it is...
"Mark Rae" <mark@.markN-O-S-P-A-M.co.uk> wrote in message
news:eQVWamnFGHA.3064@.TK2MSFTNGP10.phx.gbl...
> "Mantorok" <mantorok@.mantorok.com> wrote in message
> news:dq0nd6$rbg$1@.newsfeed.th.ifl.net...
>> Wait a minute - do you mean hyperlinks or just linking to non-secure
>> stuff, if you mean the latter then no, but the former - yes.
> Either; both; whatever - that's the way it is...

I don't think so - a hyperlink on a SSL site pointing to HTTP is not classed
as containing a non-secure item.

Firefox doesn't seem to give me this message, only IE...

Kev
"Bruce Barker" <brubar_nospamplease_@.safeco.com> wrote in message
news:ORHYzZiFGHA.2444@.TK2MSFTNGP11.phx.gbl...
> most likely you are referencing an image over http. the easiest way to
> find the reference is to use firefox, and goto to the media tab on the
> pageinfo, you will see the http reference.

Nope - all HTTPS - also, Firefox doesn't give me this shit - only IE
does...

Kev
Hi

Any references to non-SSL pages - including the code which is generated by
the Menu can cause the warning. I've noticed when I create a menu (I'm having
many other issues right now which I'm working through) that the page
generates LOTS of code and references a files in the head from the root
called /WebResource.axd?d=6txiuwerieurieuriu etc.

Also, any sytle sheet references would need considering too.

does this help?

There is a bug concerning SSL and ASP.Net 2.0 Menu Control

Hi all
It appears there is a bug - when using a 2 or more tier menu control in
asp.net in an SSL environment you get prompted with the:
"This page contains both secure and non-secure items blah blah"
a) has anyone else experienced?
b) if so do we know when to expect it to be fixed?
Thanks
KevMantorok wrote:
> Hi all
> It appears there is a bug - when using a 2 or more tier menu control in
> asp.net in an SSL environment you get prompted with the:
> "This page contains both secure and non-secure items blah blah"
Have you looked at the generated HTML to see if there is a mistake that
you made? I haven't used this control in an SSL environment yet so I'm
only speculating.
Good luck,
Sean
"Fao, Sean" <enceladus311@.yahoo.comI-WANT-NO-SPAM> wrote in message
news:ubV70OfFGHA.1288@.TK2MSFTNGP09.phx.gbl...
> Mantorok wrote:
> Have you looked at the generated HTML to see if there is a mistake that
> you made? I haven't used this control in an SSL environment yet so I'm
> only speculating.
Yep I've checked, I've used relative paths in my links.
Kev
"Mantorok" <mantorok@.mantorok.com> wrote in message
news:dq0h62$nmc$1@.newsfeed.th.ifl.net...

> Yep I've checked, I've used relative paths in my links.
Do any of the links point to resources in non-SSL locations? If so, you will
get the message box by default when you access an SSL page which contains
links to non-SSL resources.
"Mark Rae" <mark@.markN-O-S-P-A-M.co.uk> wrote in message
news:Oub62lfFGHA.1676@.TK2MSFTNGP09.phx.gbl...
> "Mantorok" <mantorok@.mantorok.com> wrote in message
> news:dq0h62$nmc$1@.newsfeed.th.ifl.net...
>
> Do any of the links point to resources in non-SSL locations? If so, you
> will get the message box by default when you access an SSL page which
> contains links to non-SSL resources.
Yes there are links in the master page that link back to non-secure sites -
does that really make a difference? Sounds odd if it does.
Kev
"Mantorok" <mantorok@.mantorok.com> wrote in message
news:dq0lgl$q9r$1@.newsfeed.th.ifl.net...

> Yes there are links in the master page that link back to non-secure
> sites -
There's your problem...

> does that really make a difference?
Yes.

> Sounds odd if it does.
Perfectly logical if you think about it...
"Mark Rae" <mark@.markN-O-S-P-A-M.co.uk> wrote in message
news:eGZYZCgFGHA.1676@.TK2MSFTNGP09.phx.gbl...
> "Mantorok" <mantorok@.mantorok.com> wrote in message
> news:dq0lgl$q9r$1@.newsfeed.th.ifl.net...
>
> There's your problem...
>
> Yes.
>
> Perfectly logical if you think about it...
Wait a minute - do you mean hyperlinks or just linking to non-secure stuff,
if you mean the latter then no, but the former - yes.
Kev
most likely you are referencing an image over http. the easiest way to find
the reference is to use firefox, and goto to the media tab on the pageinfo,
you will see the http reference.
-- bruce (sqlwork.com)
"Mantorok" <mantorok@.mantorok.com> wrote in message
news:dq0gjm$nbo$1@.newsfeed.th.ifl.net...
> Hi all
> It appears there is a bug - when using a 2 or more tier menu control in
> asp.net in an SSL environment you get prompted with the:
> "This page contains both secure and non-secure items blah blah"
> a) has anyone else experienced?
> b) if so do we know when to expect it to be fixed?
> Thanks
> Kev
>
"Mantorok" <mantorok@.mantorok.com> wrote in message
news:dq0nd6$rbg$1@.newsfeed.th.ifl.net...

> Wait a minute - do you mean hyperlinks or just linking to non-secure
> stuff, if you mean the latter then no, but the former - yes.
Either; both; whatever - that's the way it is...
"Mark Rae" <mark@.markN-O-S-P-A-M.co.uk> wrote in message
news:eQVWamnFGHA.3064@.TK2MSFTNGP10.phx.gbl...
> "Mantorok" <mantorok@.mantorok.com> wrote in message
> news:dq0nd6$rbg$1@.newsfeed.th.ifl.net...
>
> Either; both; whatever - that's the way it is...
I don't think so - a hyperlink on a SSL site pointing to HTTP is not classed
as containing a non-secure item.
Firefox doesn't seem to give me this message, only IE...
Kev

Wednesday, March 28, 2012

thin client using ASP.net

Hello experts,

i read about thin client using Facado (http://www.nexusedge.com/products/products-facado-faq.htm) which is a rich, thin, Java J2EE solution... instead of "click n refresh" HTML, it works like a client-server application. so, the only data that goes back n forth between client n server are relevant data objects...

BUT i also read somewhere (maybe in msdn) under the topic "Application Design Guidelines: From N-Tier to .NET" that says...... "ASP.net Web controls allow building reusable browser GUI elements"...

so i just want to know...
- are these 2 description are similar one thing, that is a rich, thin, client.
- for the 2nd paragraph (.net) is it using the CLICKONCE deployment in visual studio?
- for .net, is there any online example of this type of application (thin client) that i can look for?

thank you very much!I am not an expert but a newbie, too.
However, if not misunderstood by me, you can use Javascript in your pages to do almost all the things that may run on clients.
yes. i'm currently using javascript

but i want to know about thin client like / similar to Facado.. is there any examples that i can try?
Hi,

my guess is that you mean "smart clients" and clickonce is, for as far as I know currently, a new feature in the .NET 2.0 framework that's shipping in 2005.

Smart clients could be winforms that are automatically updated but they can also be winforms controls that are embedded in your asp.net pages.

asp.net web controls provide a lot of things but they don't act like java applets like Facado (I only took a fast glimpse at it).

A link that give you a first impression of what I mean:Host Secure, Lightweight Client-Side Controls in Microsoft Internet Explorer.

Grz, Kris.

Things i should learn with asp.net 2.0

So i have now been 2.0 for almost a month and i have learned a great deal.

I was a asp.net 1.1 programmer for about 3 years prior to that. But now, im up to my neck in 2.0 books and all over the net reading and learning about many different things.

i wanted to ask the gurus out there one more question:

What key areas should i study regarding asp.net 2.0 ? I mean, what are the new important changes with 2.0 that makes programming easier, or at least faster.

I have learned a great deal about TableAdapters and the new <asp:SqlDataSource> objects and they are great. But what other new features are worth really looking into? With 1.1 i was strict code-behind always writing long code from scratch. I realize this can sill be done in 2.0 but i mean, maybe i should evolve a bit. Reading Scott Guthries posts on 2.0 makes me desire to find new ways to do the same old things. But now im just feeling like im spinning my wheels. I know theres tonnes of new 2.0 features to use but i dont know where to begin.

Any advice on some specific classes or objects that have helped you guys do things faster in 2.0 (as compared to 1.1) would be amazing.

Thanks in advance,

mcm

You hit the most useful from my standpoint with the table adapters, I assume you are using the xml file version in the App_Code dir, and the sqldatasource. Also, check out the login, authentication, profile, roles, and membership functionality. For me and my application it didn't work, I had to use the old way of hard coding a lot of that, but if your site is on the low to medium difficulty scale of development, they could save you a lot of time. I found those objects only worked well if there were just a few levels of access. I also like the sitemap features which makes breadcrumbs and site map pages really easy. Master pages also make life much easier. Definately use master pages. This site is where I started while learning so if you haven't checked out the tutorials athttp://www.asp.net/learn/dataaccess/default.aspx?tabid=63 they were very helpful for me to start the transition. Hope that helps.

Thinks to be followed while working in asp.net in V2005

I am very new to V2005 .and now i have stared a new project in that anybody
who have experianced plz give me some suggestion /rules to be followed while
doing a asp.net project in V2005

Regards
PrabakarThat's a very broad question :)

There isn't anything in particular that I would suggest...except...

If you come from a classic ASP or PHP background, open your mind to doing
things differently.

I've seen many people who are new to ASP.Net and just don't get it. For
example, instead of using DataBound controls, I've seen people use for loops
and output HTML like they normally would.

ASP.NET is very different and has a big learning curve. Start small and
learn as you go...don't get discouraged :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Prabakar Samiyappan" <PrabakarSamiyappan@.discussions.microsoft.comwrote
in message news:96785518-D0A9-4294-BC72-2061F8B194EA@.microsoft.com...

Quote:

Originally Posted by

>I am very new to V2005 .and now i have stared a new project in that anybody
who have experianced plz give me some suggestion /rules to be followed
while
doing a asp.net project in V2005
>
Regards
Prabakar

Thinks to be followed while working in asp.net in V2005

I am very new to V2005 .and now i have stared a new project in that anybody
who have experianced plz give me some suggestion /rules to be followed while
doing a asp.net project in V2005
Regards
PrabakarThat's a very broad question :)
There isn't anything in particular that I would suggest...except...
If you come from a classic ASP or PHP background, open your mind to doing
things differently.
I've seen many people who are new to ASP.Net and just don't get it. For
example, instead of using DataBound controls, I've seen people use for loops
and output HTML like they normally would.
ASP.NET is very different and has a big learning curve. Start small and
learn as you go...don't get discouraged :)
Karl
http://www.openmymind.net/
http://www.fuelindustries.com/
"Prabakar Samiyappan" <PrabakarSamiyappan@.discussions.microsoft.com> wrote
in message news:96785518-D0A9-4294-BC72-2061F8B194EA@.microsoft.com...
>I am very new to V2005 .and now i have stared a new project in that anybody
> who have experianced plz give me some suggestion /rules to be followed
> while
> doing a asp.net project in V2005
> Regards
> Prabakar

Third Level Domain And ASP.NET 2.0

I need to write and test a new ASP.NET 2.0 application that uses third level
domains, like test.MyDomainName.Com. I just cannot figure out how to get the
new development server to allow this, if its even possible.

I have already tried http://test.localhost:2600/NewProject/Index.aspx, and
it does not like that. Then I added test.localhost to my host file to resolve
to 127.0.0.1 and tried the same URL again and it works, but ASP code of
Request.Url.Host only returns localhost. I have poked all around in the
properties in the request object as well as the request.url object and cannot
find anywhere were its picking up my domain prefix.

Anyone dealt with this before?

Thx in advance!

RossWhat you need to do is run a DNS server on your development server's box,
configure your test subdomain, and use IIS instead of VS 2005's internal server.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Ross Nornes" <RossNornes@.discussions.microsoft.comwrote in message
news:69D28053-658E-41F6-B778-D4BD2FFAD1E8@.microsoft.com...

Quote:

Originally Posted by

>I need to write and test a new ASP.NET 2.0 application that uses third level
domains, like test.MyDomainName.Com. I just cannot figure out how to get the
new development server to allow this, if its even possible.
>
I have already tried http://test.localhost:2600/NewProject/Index.aspx, and
it does not like that. Then I added test.localhost to my host file to resolve
to 127.0.0.1 and tried the same URL again and it works, but ASP code of
Request.Url.Host only returns localhost. I have poked all around in the
properties in the request object as well as the request.url object and cannot
find anywhere were its picking up my domain prefix.
>
Anyone dealt with this before?
>
Thx in advance!
>
Ross


Cool, thx for the reply Juan!

I figured it out now. People dont call these "third level domains" like I
do, I guess the more common term is "subdomain". :-) Go figure... Found lots
more info on Google after figuring that out...

Between your response and a few reponses to the subdomain google queries I
did, I took a little more simplistic approach since I did not want stand up a
DNS server on my box.

For anyone else wanting a solution, what I did was setup the Windows XP IIS
default website to point at my new ASP.NET 2.0 website I'm developing, I
edited my host file and created domains in there like test1.localhost.com,
test2.localhost.com and pointed them all at 127.0.0.1, then set up these test
subdomains as host headers in the default IIS website and bingo, I have a
functional test enviorment!

Thx!

Ross

"Juan T. Llibre" wrote:

Quote:

Originally Posted by

What you need to do is run a DNS server on your development server's box,
configure your test subdomain, and use IIS instead of VS 2005's internal server.
>
>
>
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?ol : http://asp.net.do/foros/
===================================
"Ross Nornes" <RossNornes@.discussions.microsoft.comwrote in message
news:69D28053-658E-41F6-B778-D4BD2FFAD1E8@.microsoft.com...

Quote:

Originally Posted by

I need to write and test a new ASP.NET 2.0 application that uses third level
domains, like test.MyDomainName.Com. I just cannot figure out how to get the
new development server to allow this, if its even possible.

I have already tried http://test.localhost:2600/NewProject/Index.aspx, and
it does not like that. Then I added test.localhost to my host file to resolve
to 127.0.0.1 and tried the same URL again and it works, but ASP code of
Request.Url.Host only returns localhost. I have poked all around in the
properties in the request object as well as the request.url object and cannot
find anywhere were its picking up my domain prefix.

Anyone dealt with this before?

Thx in advance!

Ross


>
>
>

Third-party BLOG app to use in ASP.NET website?

I want to have a BLOG in my ASP.NET website. Are there third-party
apps/plug-ins already out there? If so, can someone recommend the top few
for .NET? Is there an app from Microsoft more specific/integrated with an
ASP.NET app?

Thanks very much,
RonCheck these out :

http://csharp-source.net/open-source/bloggers|

You might also want to check out Presstopia :
http://presstopia.com/dnn/Default.aspx?tabid=159
...and Community Server :
http://communityserver.org/content/...yServerNow.aspx
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Ronald S. Cook" <rcook@.westinis.comwrote in message
news:6FF5EAD4-8592-444A-BEA7-10C058734CD6@.microsoft.com...

Quote:

Originally Posted by

>I want to have a BLOG in my ASP.NET website. Are there third-party apps/plug-ins already out
>there? If so, can someone recommend the top few for .NET? Is there an app from Microsoft more
>specific/integrated with an ASP.NET app?
>
Thanks very much,
Ron
>


I use thinkjot on my site

No database to worry about, and quite easy to setup
http://www.process64.com/thinkjot/download.htm
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Juan T. Llibre" <nomailreplies@.nowhere.comwrote in message
news:uRAWhYsLHHA.1248@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Check these out :
>
http://csharp-source.net/open-source/bloggers|
>
You might also want to check out Presstopia :
http://presstopia.com/dnn/Default.aspx?tabid=159
>
...and Community Server :
http://communityserver.org/content/...yServerNow.aspx
>
>
>
>
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Ronald S. Cook" <rcook@.westinis.comwrote in message
news:6FF5EAD4-8592-444A-BEA7-10C058734CD6@.microsoft.com...

Quote:

Originally Posted by

>>I want to have a BLOG in my ASP.NET website. Are there third-party
>>apps/plug-ins already out there? If so, can someone recommend the top few
>>for .NET? Is there an app from Microsoft more specific/integrated with an
>>ASP.NET app?
>>
>Thanks very much,
>Ron
>>


>
>


dasBlog

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
"John Timney (MVP)" <x_john@.timney.eclipse.co.ukwrote in message
news:osidnRnwl7RMPwbYnZ2dnUVZ8sGvnZ2d@.eclipse.net. uk...

Quote:

Originally Posted by

>I use thinkjot on my site
>
No database to worry about, and quite easy to setup
http://www.process64.com/thinkjot/download.htm
>
Regards
>
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
>
>
"Juan T. Llibre" <nomailreplies@.nowhere.comwrote in message
news:uRAWhYsLHHA.1248@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

>Check these out :
>>
>http://csharp-source.net/open-source/bloggers|
>>
>You might also want to check out Presstopia :
>http://presstopia.com/dnn/Default.aspx?tabid=159
>>
>...and Community Server :
>http://communityserver.org/content/...yServerNow.aspx
>>
>>
>>
>>
>Juan T. Llibre, asp.net MVP
>asp.net faq : http://asp.net.do/faq/
>foros de asp.net, en espaol : http://asp.net.do/foros/
>===================================
>"Ronald S. Cook" <rcook@.westinis.comwrote in message
>news:6FF5EAD4-8592-444A-BEA7-10C058734CD6@.microsoft.com...

Quote:

Originally Posted by

>>>I want to have a BLOG in my ASP.NET website. Are there third-party
>>>apps/plug-ins already out there? If so, can someone recommend the top
>>>few for .NET? Is there an app from Microsoft more specific/integrated
>>>with an ASP.NET app?
>>>
>>Thanks very much,
>>Ron
>>>


>>
>>


>
>


Thinkjot is just the dasblog code cut down

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"clintonG" <csgallagher@.REMOVETHISTEXTmetromilwaukee.comwrote in message
news:uRhP9G1LHHA.4000@.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

dasBlog
>
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
>
"John Timney (MVP)" <x_john@.timney.eclipse.co.ukwrote in message
news:osidnRnwl7RMPwbYnZ2dnUVZ8sGvnZ2d@.eclipse.net. uk...

Quote:

Originally Posted by

>>I use thinkjot on my site
>>
>No database to worry about, and quite easy to setup
>http://www.process64.com/thinkjot/download.htm
>>
>Regards
>>
>John Timney (MVP)
>VISIT MY WEBSITE:
>http://www.johntimney.com
>http://www.johntimney.com/blog
>>
>>
>"Juan T. Llibre" <nomailreplies@.nowhere.comwrote in message
>news:uRAWhYsLHHA.1248@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

>>Check these out :
>>>
>>http://csharp-source.net/open-source/bloggers|
>>>
>>You might also want to check out Presstopia :
>>http://presstopia.com/dnn/Default.aspx?tabid=159
>>>
>>...and Community Server :
>>http://communityserver.org/content/...yServerNow.aspx
>>>
>>>
>>>
>>>
>>Juan T. Llibre, asp.net MVP
>>asp.net faq : http://asp.net.do/faq/
>>foros de asp.net, en espaol : http://asp.net.do/foros/
>>===================================
>>"Ronald S. Cook" <rcook@.westinis.comwrote in message
>>news:6FF5EAD4-8592-444A-BEA7-10C058734CD6@.microsoft.com...
>>>>I want to have a BLOG in my ASP.NET website. Are there third-party
>>>>apps/plug-ins already out there? If so, can someone recommend the top
>>>>few for .NET? Is there an app from Microsoft more specific/integrated
>>>>with an ASP.NET app?
>>>>
>>>Thanks very much,
>>>Ron
>>>>
>>>
>>>


>>
>>


>
>


Nice of you to point that out. Visiting the ThinkJot page inferred an
orphaned initiative and AFIK dasBlog continues to be developed by what's his
name [1]. The point is, the objective many have on their minds is how to
integrate blogging functionality into an existing site.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
[1] Scott Hanselman
http://www.hanselman.com/blog/Categ...=DasBlog&page=2
"John Timney (MVP)" <x_john@.timney.eclipse.co.ukwrote in message
news:T4KdnW7UQPOHlwHYRVnyvgA@.eclipse.net.uk...

Quote:

Originally Posted by

Thinkjot is just the dasblog code cut down
>
--
--
Regards
>
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
>
>
"clintonG" <csgallagher@.REMOVETHISTEXTmetromilwaukee.comwrote in message
news:uRhP9G1LHHA.4000@.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

>dasBlog
>>
><%= Clinton Gallagher
> NET csgallagher AT metromilwaukee.com
> URL http://clintongallagher.metromilwaukee.com/
> MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
>>
>"John Timney (MVP)" <x_john@.timney.eclipse.co.ukwrote in message
>news:osidnRnwl7RMPwbYnZ2dnUVZ8sGvnZ2d@.eclipse.net. uk...

Quote:

Originally Posted by

>>>I use thinkjot on my site
>>>
>>No database to worry about, and quite easy to setup
>>http://www.process64.com/thinkjot/download.htm
>>>
>>Regards
>>>
>>John Timney (MVP)
>>VISIT MY WEBSITE:
>>http://www.johntimney.com
>>http://www.johntimney.com/blog
>>>
>>>
>>"Juan T. Llibre" <nomailreplies@.nowhere.comwrote in message
>>news:uRAWhYsLHHA.1248@.TK2MSFTNGP02.phx.gbl...
>>>Check these out :
>>>>
>>>http://csharp-source.net/open-source/bloggers|
>>>>
>>>You might also want to check out Presstopia :
>>>http://presstopia.com/dnn/Default.aspx?tabid=159
>>>>
>>>...and Community Server :
>>>http://communityserver.org/content/...yServerNow.aspx
>>>>
>>>>
>>>>
>>>>
>>>Juan T. Llibre, asp.net MVP
>>>asp.net faq : http://asp.net.do/faq/
>>>foros de asp.net, en espaol : http://asp.net.do/foros/
>>>===================================
>>>"Ronald S. Cook" <rcook@.westinis.comwrote in message
>>>news:6FF5EAD4-8592-444A-BEA7-10C058734CD6@.microsoft.com...
>>>>>I want to have a BLOG in my ASP.NET website. Are there third-party
>>>>>apps/plug-ins already out there? If so, can someone recommend the top
>>>>>few for .NET? Is there an app from Microsoft more specific/integrated
>>>>>with an ASP.NET app?
>>>>>
>>>>Thanks very much,
>>>>Ron
>>>>>
>>>>
>>>>
>>>
>>>


>>
>>


>
>

Third-party BLOG app to use in ASP.NET website?

I want to have a BLOG in my ASP.NET website. Are there third-party
apps/plug-ins already out there? If so, can someone recommend the top few
for .NET? Is there an app from Microsoft more specific/integrated with an
ASP.NET app?
Thanks very much,
RonCheck these out :
http://csharp-source.net/open-source/bloggers|
You might also want to check out Presstopia :
http://presstopia.com/dnn/Default.aspx?tabid=159
...and Community Server :
http://communityserver.org/content/...yServerNow.aspx
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Ronald S. Cook" <rcook@.westinis.com> wrote in message
news:6FF5EAD4-8592-444A-BEA7-10C058734CD6@.microsoft.com...
>I want to have a BLOG in my ASP.NET website. Are there third-party apps/pl
ug-ins already out
>there? If so, can someone recommend the top few for .NET? Is there an app
from Microsoft more
>specific/integrated with an ASP.NET app?
> Thanks very much,
> Ron
>
I use thinkjot on my site
No database to worry about, and quite easy to setup
http://www.process64.com/thinkjot/download.htm
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:uRAWhYsLHHA.1248@.TK2MSFTNGP02.phx.gbl...
> Check these out :
> http://csharp-source.net/open-source/bloggers|
> You might also want to check out Presstopia :
> http://presstopia.com/dnn/Default.aspx?tabid=159
> ...and Community Server :
> http://communityserver.org/content/...yServerNow.aspx
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaol : http://asp.net.do/foros/
> ===================================
> "Ronald S. Cook" <rcook@.westinis.com> wrote in message
> news:6FF5EAD4-8592-444A-BEA7-10C058734CD6@.microsoft.com...
>
dasBlog
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
"John Timney (MVP)" <x_john@.timney.eclipse.co.uk> wrote in message
news:osidnRnwl7RMPwbYnZ2dnUVZ8sGvnZ2d@.ec
lipse.net.uk...
>I use thinkjot on my site
> No database to worry about, and quite easy to setup
> http://www.process64.com/thinkjot/download.htm
> Regards
> John Timney (MVP)
> VISIT MY WEBSITE:
> http://www.johntimney.com
> http://www.johntimney.com/blog
>
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:uRAWhYsLHHA.1248@.TK2MSFTNGP02.phx.gbl...
>
Thinkjot is just the dasblog code cut down
--
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"clintonG" < csgallagher@.REMOVETHISTEXTmetromilwaukee
.com> wrote in message
news:uRhP9G1LHHA.4000@.TK2MSFTNGP06.phx.gbl...
> dasBlog
> <%= Clinton Gallagher
> NET csgallagher AT metromilwaukee.com
> URL http://clintongallagher.metromilwaukee.com/
> MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
> "John Timney (MVP)" <x_john@.timney.eclipse.co.uk> wrote in message
> news:osidnRnwl7RMPwbYnZ2dnUVZ8sGvnZ2d@.ec
lipse.net.uk...
>
Nice of you to point that out. Visiting the ThinkJot page inferred an
orphaned initiative and AFIK dasBlog continues to be developed by what's his
name [1]. The point is, the objective many have on their minds is how to
integrate blogging functionality into an existing site.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
[1] Scott Hanselman
http://www.hanselman.com/blog/Categ...=DasBlog&page=2
"John Timney (MVP)" <x_john@.timney.eclipse.co.uk> wrote in message
news:T4KdnW7UQPOHlwHYRVnyvgA@.eclipse.net.uk...
> Thinkjot is just the dasblog code cut down
> --
> --
> Regards
> John Timney (MVP)
> VISIT MY WEBSITE:
> http://www.johntimney.com
> http://www.johntimney.com/blog
>
> "clintonG" < csgallagher@.REMOVETHISTEXTmetromilwaukee
.com> wrote in message
> news:uRhP9G1LHHA.4000@.TK2MSFTNGP06.phx.gbl...
>

Monday, March 26, 2012

This is an ASP.NET complite program and it works fine. An error is genereded if

Hi,

Following is an ASP.NET complite program and it works fine. An error is genereded if there is one record at the last page of the DataGrid.
Here is the error generated by the system System.Web.HttpException: Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.
is there any way to fix this problem?

Here's the Code:
<%@dotnet.itags.org. Import Namespace="System.Data" %>
<%@dotnet.itags.org. Import Namespace="System.Data.SQLClient" %>
<html>
<head>
<meta name="GENERATOR" Content="ASP Express 2.1">
<title>Deleting from DataBase using a DataGrid</title>
<script language="VB" runat="server">

Sub MyDataGrid_DeleteCommand(s As Object, e As DataGridCommandEventArgs )
Dim strConn as String = "server=YourServer;uid=YourUID;pwd=YourPWD;database=YourDB"
Dim DeleteCmd As String = "DELETE from safetable Where id = @dotnet.itags.org.Id"
Dim MyConn as New SQLConnection(strConn)
Dim Cmd as New SqlCommand(DeleteCmd, MyConn)
Cmd.Parameters.Add(New SqlParameter("@dotnet.itags.org.ID", MyDataGrid.DataKeys(CInt(e.Item.ItemIndex))))
MyConn.Open()
Cmd.ExecuteNonQuery()
MyConn.Close()
BindData
End Sub

Sub Page_Change(sender As Object, e As DataGridPageChangedEventArgs)
MyDataGrid.CurrentPageIndex = e.NewPageIndex
BindData
End Sub

Sub Page_Load(Source As Object, E As EventArgs)
If Not Page.IsPostBack Then
BindData()
End If
End Sub

Sub BindData()
Dim strConn as String = "server=YourServer;uid=YourUID;pwd=YourPWD;database=YourDB"
Dim MySQL as string = "Select * from safetable Order by id desc"
Dim MyConn as New SQLConnection(strConn)
Dim ds as DataSet=New DataSet()
Dim Cmd as New SQLDataAdapter(MySQL,MyConn)
Cmd.Fill(ds,"safetable")
MyDataGrid.Datasource=ds.Tables("safetable").DefaultView
MyDataGrid.DataBind()
End Sub
</script>
</head>
<body>
<form runat="server" method="post">
<asp:Datagrid runat="server"
Id="MyDataGrid"
GridLines="Both"
cellpadding="0"
cellspacing="0"
Headerstyle-BackColor="#8080C0"
Headerstyle-Font-Name="Arial"
Headerstyle-Font-Bold="True"
Headerstyle-Font-Size="14"
BackColor="#8080FF"
Font-Name="Arial"
Font-Size="11"
AlternatingItemStyle-BackColor="#C0C0C0"
AlternatingItemStyle-Font-Name="Arial"
AlternatingItemStyle-Font-Size="11"
BorderColor="Black"
AllowPaging = "True"
PageSize = "8"
PagerStyle-Mode = "NumericPages"
PagerStyle-HorizontalAlign="Center"
PagerStyle-PageButtonCount = "10"
OnPageIndexChanged = "Page_Change"
AutogenerateColumns="False"
OnDeleteCommand="MyDataGrid_DeleteCommand"
DataKeyField="id"
Width="50%">
<Columns>
<asp:ButtonColumn Text="Delete" HeaderText="Delete" CommandName="Delete"></asp:ButtonColumn>
<asp:BoundColumn DataField="fname" HeaderText="fname"></asp:BoundColumn>
<asp:BoundColumn DataField="lname" HeaderText="lname"></asp:BoundColumn>
</Columns>
</asp:DataGrid>
</form>Here is the table structure for SQL

CREATE TABLE [safetable] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[fname] [char] (10) NULL ,
[lname] [char] (10) NULL
) ON [PRIMARY]
GO
Sub Page_Change(sender As Object, e As DataGridPageChangedEventArgs)
Dim pageIndex As Integer
If e.NewPageIndex >= 0 And e.NewPageIndex < MyDataGrid.PageCount
' Valid page index.
pageIndex = e.NewPageIndex
Else If e.NamePageIndex < 0
' Move to the first page.
pageIndex = 0
Else
' Move to the last page.
pageIndex = MyDataGrid.PageCount
End If

MyDataGrid.CurrentPageIndex = pageIndex
BindData
End Sub
Thanks for your support but I am getting same error. When I am at the last page on the datagrid, there is only one record is shown. I delete that record and it is deleted successfully. Since there is no data to show on the last page of the datagird, system cannot bind it. Thats why I am getting this error. After deleting the last record on the last page of the datagrid, it should display previous page.
Same solution... :)
Move the code in the Page_Change event into a separate function, and use that function only to DataBind(), then add calls to that function in both Page_Change and MyDataGrid_DeleteCommand events.
Your solution is not clear to me! Is there any way that you can create a sample?

Thanks
It's untested, but should work.

Sub MyDataGrid_DeleteCommand(s As Object, e As DataGridCommandEventArgs )
Dim strConn as String = "server=YourServer;uid=YourUID;pwd=YourPWD;database=YourDB"
Dim DeleteCmd As String = "DELETE from safetable Where id = @.Id"
Dim MyConn as New SQLConnection(strConn)
Dim Cmd as New SqlCommand(DeleteCmd, MyConn)
Cmd.Parameters.Add(New SqlParameter("@.ID", MyDataGrid.DataKeys(CInt(e.Item.ItemIndex))))
MyConn.Open()
Cmd.ExecuteNonQuery()
MyConn.Close()
BindData
End Sub

Sub Page_Change(sender As Object, e As DataGridPageChangedEventArgs)
MyDataGrid.CurrentPageIndex = GetValidPageIndex(e.NewPageIndex)
BindData
End Sub

Sub Page_Load(Source As Object, E As EventArgs)
If Not Page.IsPostBack Then
BindData()
End If
End Sub

Sub BindData()
Dim strConn as String = "server=YourServer;uid=YourUID;pwd=YourPWD;database=YourDB"
Dim MySQL as string = "Select * from safetable Order by id desc"
Dim MyConn as New SQLConnection(strConn)
Dim ds as DataSet=New DataSet()
Dim Cmd as New SQLDataAdapter(MySQL,MyConn)

Cmd.Fill(ds, "safetable")
With MyDataGrid
.Datasource = ds.Tables("safetable").DefaultView
.CurrentPageIndex = GetValidPageIndex(.CurrentPageIndex)
.DataBind()
End With
End Sub

Function GetValidPageIndex(ByVal intCurrentIndex As Integer) As Integer
Dim pageIndex As Integer
If e.NewPageIndex >= 0 And e.NewPageIndex < MyDataGrid.PageCount
' Valid page index.
pageIndex = e.NewPageIndex
Else If e.NamePageIndex < 0
' Move to the first page.
pageIndex = 0
Else
' Move to the last page.
pageIndex = MyDataGrid.PageCount
End If
End Function
Hi,

Is it posible that you can take a look at the your function GetValidPageIndex?. I had a error with it.
I made some modification to your function GetValidPageIndex and I still get error. Here is the code that I made modification.

Function GetValidPageIndex(ByVal intCurrentIndex As Integer) As Integer
Dim pageIndex As Integer
If intCurrentIndex >= 0 And intCurrentIndex < MyDataGrid.PageCount
' Valid page index.
GetValidPageIndex = intCurrentIndex
Else If intCurrentIndex < 0
' Move to the first page.
GetValidPageIndex = 0
Else
' Move to the last page.
GetValidPageIndex = MyDataGrid.PageCount
End If
End Function
I add following code and It worked fine.

Dim Result As Integer = MyDataGrid.Items.Count Mod MyDataGrid.PageSize

If Result = 1 Then
MyDataGrid.CurrentPageIndex = ( MyDataGrid.PageCount - 2)
End If

this is the asp.net code

All that error message says, is that you are not allowed to see the actual
error due to your Web.config settings. Change your settings to see the
actual error, as it could be happening anywhere, not necessarily in the
snippet you provided.

"chris" <anonymous@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:0715C212-605A-4162-904F-CBBD5021B896@dotnet.itags.org.microsoft.com...
> Sub BindDropBox()
> conPos.Open()
>
> oSevenIssuesCMD = New SqlCommand("SevenIssues", conPos)
>
> oSevenIssuesCMD.CommandType = CommandType.StoredProcedure
>
> oSevenIssuesCMD.Parameters.Add(New SqlParameter("@dotnet.itags.org.productName",
SqlDbType.VarChar, 50))
> oSevenIssuesCMD.Parameters("@dotnet.itags.org.productName").Value = "TESTPRODUCT"
>
> oSevenIssuesReader = oSevenIssuesCMD.ExecuteReader
>
> DropDownList1().DataSource = oSevenIssuesReader
> DropDownList1.DataTextField = "Cover_Date"
> DropDownList1.DataValueField = "Cover_Date"
>
> DropDownList1.DataBind()
>
> conPos.Close()
>
> End Sub
>
> This is the error
>
> Server Error in '/TEST_application' Application.
> -----------------------
--
> Runtime Error
> Description: An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons). It
could, however, be viewed by browsers running on the local server machine.
> Details: To enable the details of this specific error message to be
viewable on remote machines, please create a <customErrors> tag within a
"web.config" configuration file located in the root directory of the current
web application. This <customErrors> tag should then have its "mode"
attribute set to "Off".
>
> <!-- Web.Config Configuration
File --><configuration><system.web><customErrors
mode="Off"/></system.web></configuration>
>
> Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirect" attribute of the application's
<customErrors> configuration tag to point to a custom error page URL.
>
> <!-- Web.Config Configuration
File --><configuration><system.web><customErrors mode="RemoteOnly"
defaultRedirect="mycustompage.htm"/></system.web></configurationDid you read the error message? It said to change the mode attribute to
'Off'.

Alternatively, it said you could view the real error by running the page
from the server itself.

"chris" <anonymous@.discussions.microsoft.com> wrote in message
news:C9D4F429-9192-4F60-8812-8FFEDA62FBD1@.microsoft.com...
> change it to what?

this is the asp.net code

Sub BindDropBox()
conPos.Open()
oSevenIssuesCMD = New SqlCommand("SevenIssues", conPos)
oSevenIssuesCMD.CommandType = CommandType.StoredProcedure
oSevenIssuesCMD.Parameters.Add(New SqlParameter("@dotnet.itags.org.productName", SqlDbType.Va
rChar, 50))
oSevenIssuesCMD.Parameters("@dotnet.itags.org.productName").Value = "TESTPRODUCT"
oSevenIssuesReader = oSevenIssuesCMD.ExecuteReader
DropDownList1().DataSource = oSevenIssuesReader
DropDownList1.DataTextField = "Cover_Date"
DropDownList1.DataValueField = "Cover_Date"
DropDownList1.DataBind()
conPos.Close()
End Sub
This is the error
Server Error in '/TEST_application' Application.
----
--
Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers runni
ng on the local server machine.
Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrors> tag within a "web.config
" configuration file located in the root directory of the current web applic
ation. This <customErrors>
tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File --><configuration><system.web><customErro
rs mode="Off"/></system.web></configuration>
Notes: The current error page you are seeing can be replaced by a custom err
or page by modifying the "defaultRedirect" attribute of the application's <c
ustomErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration><system.web><customErro
rs mode="RemoteOnly" defaultRedirect="mycustompage.htm"/></system.web></conf
iguration>All that error message says, is that you are not allowed to see the actual
error due to your Web.config settings. Change your settings to see the
actual error, as it could be happening anywhere, not necessarily in the
snippet you provided.
"chris" <anonymous@.discussions.microsoft.com> wrote in message
news:0715C212-605A-4162-904F-CBBD5021B896@.microsoft.com...
> Sub BindDropBox()
> conPos.Open()
>
> oSevenIssuesCMD = New SqlCommand("SevenIssues", conPos)
>
> oSevenIssuesCMD.CommandType = CommandType.StoredProcedure
>
> oSevenIssuesCMD.Parameters.Add(New SqlParameter("@.productName",
SqlDbType.VarChar, 50))
> oSevenIssuesCMD.Parameters("@.productName").Value = "TESTPRODUCT"
>
> oSevenIssuesReader = oSevenIssuesCMD.ExecuteReader
>
> DropDownList1().DataSource = oSevenIssuesReader
> DropDownList1.DataTextField = "Cover_Date"
> DropDownList1.DataValueField = "Cover_Date"
>
> DropDownList1.DataBind()
>
> conPos.Close()
>
> End Sub
>
> This is the error
>
> Server Error in '/TEST_application' Application.
> ----
--
> Runtime Error
> Description: An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons). It
could, however, be viewed by browsers running on the local server machine.
> Details: To enable the details of this specific error message to be
viewable on remote machines, please create a <customErrors> tag within a
"web.config" configuration file located in the root directory of the current
web application. This <customErrors> tag should then have its "mode"
attribute set to "Off".
>
> <!-- Web.Config Configuration
File --><configuration><system.web><customErrors
mode="Off"/></system.web></configuration>
>
> Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirect" attribute of the application's
<customErrors> configuration tag to point to a custom error page URL.
>
> <!-- Web.Config Configuration
File --><configuration><system.web><customErrors mode="RemoteOnly"
defaultRedirect="mycustompage.htm"/></system.web></configuration>
change it to what?
Did you read the error message? It said to change the mode attribute to
'Off'.
Alternatively, it said you could view the real error by running the page
from the server itself.
"chris" <anonymous@.discussions.microsoft.com> wrote in message
news:C9D4F429-9192-4F60-8812-8FFEDA62FBD1@.microsoft.com...
> change it to what?

Thursday, March 22, 2012

Thread for the best ASP.NET Interview Questions

Hi,

Please share best interview sites in this thread :

I start with :

http://dotnetinterview.googlepages.com
Thanks.Why is it that there seems to be such an obsession with interview questions?
The best prepared job candidate is a person who has studied and practiced and
knows what they are doing -- they don't need to be concerned with whatever
questions may come.
--Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
"interviewguy@.gmail.com" wrote:

Quote:

Originally Posted by

Hi,
>
Please share best interview sites in this thread :
>
I start with :
>
http://dotnetinterview.googlepages.com
>
Thanks.
>
>


<interviewguy@.gmail.comwrote in message
news:1189618558.040859.146200@.22g2000hsm.googlegro ups.com...

Quote:

Originally Posted by

Please share best interview sites in this thread :
>
I start with :
>
http://dotnetinterview.googlepages.com


What a complete waste of time...

--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Its just as good as getting certified. You can get your questions and
answers a head of time but have no clue what your talking about or even
reading or even doing when it comes down to it.

Mike

<interviewguy@.gmail.comwrote in message
news:1189618558.040859.146200@.22g2000hsm.googlegro ups.com...

Quote:

Originally Posted by

Hi,
>
Please share best interview sites in this thread :
>
I start with :
>
http://dotnetinterview.googlepages.com
>
Thanks.
>


On 12 Sep, 18:35, interview...@.gmail.com wrote:

Quote:

Originally Posted by

Hi,
>
Please share best interview sites in this thread :
>
I start with :
>
http://dotnetinterview.googlepages.com
>
Thanks.


There's an easy way for an employer to get around this muppetry. Ask
very general questions. For
instance ask the applicant to describe their development setup and
their development method. Get
the applicant to talk about things generally. Get them talking and
ask them open questions
which nevertheless have a limited number of good answers (e.g.
Describe some principles that you
apply to OOD?). When they give you what may be a pat answer,
drilldown to get them to elaborate
on some of the things they've said.

Thread in ASP.Net

Hi
I wana to ask that
can i make script in ASP.Net using thread?
Regards
HumairAs long as you have a good needle.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Humair Ahmed" <humair@.axact.com> wrote in message
news:e50m#NGKEHA.2692@.tk2msftngp13.phx.gbl...
> Hi
> I wana to ask that
> can i make script in ASP.Net using thread?
> Regards
> Humair
Technically, you can but you will run into problems because the script must
be streamed out to the client thru the response object. The response object
is owned by the main thread and such cross pollination is forbidden. As an
alternative, you can build the script on a thread, pass it back to the main
thread and then the main thread can stream it out to the client.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Humair Ahmed" <humair@.axact.com> wrote in message
news:e50m%23NGKEHA.2692@.tk2msftngp13.phx.gbl...
> Hi
> I wana to ask that
> can i make script in ASP.Net using thread?
> Regards
> Humair

Thread in ASP.Net

Hi
I wana to ask that
can i make script in ASP.Net using thread?
Regards
HumairAs long as you have a good needle.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"Humair Ahmed" <humair@.axact.com> wrote in message
news:e50m#NGKEHA.2692@.tk2msftngp13.phx.gbl...
> Hi
> I wana to ask that
> can i make script in ASP.Net using thread?
> Regards
> Humair
>
Technically, you can but you will run into problems because the script must
be streamed out to the client thru the response object. The response object
is owned by the main thread and such cross pollination is forbidden. As an
alternative, you can build the script on a thread, pass it back to the main
thread and then the main thread can stream it out to the client.
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Humair Ahmed" <humair@.axact.com> wrote in message
news:e50m%23NGKEHA.2692@.tk2msftngp13.phx.gbl...
> Hi
> I wana to ask that
> can i make script in ASP.Net using thread?
> Regards
> Humair
>

Tuesday, March 13, 2012

Thread Safety and ASP.NET

I use theHybrid Dictionary Object often and was advised not to use it in ASP.NET because it is not Thread Safe.

What does it really mean to not be Thread Safe; will some other thread modify the contents of the collection by mistake?ASP.NEt is multithreaded environment. In fact each user session uses its own thread. Something that is accessible to multiply threads (like static fields, application object items etc.) could be accessed simultaneously from different threads. Classes, which designed to allow this kind of access and still behave correctly, are called Thread Safe.
So, why would someone recommend that i not use an object that isn't thread safe with asp.net? Is it because the object was not designed to run in a multi-threaded environment [and may not always work]? Or is it because the object (which is not multi threaded) could reduce the scaleability of my code?
It can lock; it can crash or behave unexpected.
No no no no. The person who said that does not know what he's talking about.
Non thread safe objects should not be exchanged between threads without some precautions. But as long as you stay in one thread, you're perfectly safe to use them.
For example, from within a page request, it's perfectly ok. It starts to be dangerous if you put such an object in Session or Application where it can be accessed by several threads simultaneously.
Hi Bertrand,
Even within separate thread using such an object could be dangerous. For example if it make use of internal static resources (some kind of singleton pattern).

thread status created from asp.net

Hello,
I am sending 13000 emails alerts out using the thread from my asp.net
application. It is working smooth when I did the first and second
sending. but when I tried the third one, the server is so slow, the
thread is supposed to be abort normally each time.do you think it is
the thread I created from the first two times still alive, how could I
check thread status?
Thanks.
Ginnyyou should create a static collection to contain the threads, you can
harvest the status, or kill ones that ran too long. you might want to start
a management thread also.
-- bruce (sqlwork.com)
"ginny" <im_wang@.yahoo.com> wrote in message
news:1159292119.881690.324060@.b28g2000cwb.googlegroups.com...
> Hello,
> I am sending 13000 emails alerts out using the thread from my asp.net
> application. It is working smooth when I did the first and second
> sending. but when I tried the third one, the server is so slow, the
> thread is supposed to be abort normally each time.do you think it is
> the thread I created from the first two times still alive, how could I
> check thread status?
> Thanks.
> Ginny
>
bruce:
I am new to thread, how to create a static collection to contain the
threads?
The function in my thread is really simple, it loop 13000 times to send
13000 emails.
Thanks.
Ginny
(sqlwork.com) wrote:
> you should create a static collection to contain the threads, you can
> harvest the status, or kill ones that ran too long. you might want to star
t
> a management thread also.
> -- bruce (sqlwork.com)
> "ginny" <im_wang@.yahoo.com> wrote in message
> news:1159292119.881690.324060@.b28g2000cwb.googlegroups.com...

thread status created from asp.net

Hello,

I am sending 13000 emails alerts out using the thread from my asp.net
application. It is working smooth when I did the first and second
sending. but when I tried the third one, the server is so slow, the
thread is supposed to be abort normally each time.do you think it is
the thread I created from the first two times still alive, how could I
check thread status?

Thanks.

Ginnyyou should create a static collection to contain the threads, you can
harvest the status, or kill ones that ran too long. you might want to start
a management thread also.

-- bruce (sqlwork.com)

"ginny" <im_wang@.yahoo.comwrote in message
news:1159292119.881690.324060@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

Hello,
>
I am sending 13000 emails alerts out using the thread from my asp.net
application. It is working smooth when I did the first and second
sending. but when I tried the third one, the server is so slow, the
thread is supposed to be abort normally each time.do you think it is
the thread I created from the first two times still alive, how could I
check thread status?
>
Thanks.
>
Ginny
>


bruce:

I am new to thread, how to create a static collection to contain the
threads?
The function in my thread is really simple, it loop 13000 times to send
13000 emails.

Thanks.

Ginny

(sqlwork.com) wrote:

Quote:

Originally Posted by

you should create a static collection to contain the threads, you can
harvest the status, or kill ones that ran too long. you might want to start
a management thread also.
>
-- bruce (sqlwork.com)
>
"ginny" <im_wang@.yahoo.comwrote in message
news:1159292119.881690.324060@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

Hello,

I am sending 13000 emails alerts out using the thread from my asp.net
application. It is working smooth when I did the first and second
sending. but when I tried the third one, the server is so slow, the
thread is supposed to be abort normally each time.do you think it is
the thread I created from the first two times still alive, how could I
check thread status?

Thanks.

Ginny