Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Saturday, March 31, 2012

Table? Frameset or User control?

Hi!

I am new with ASP and now developing a web application that having two navigation menu.One is at left and another is at top side. When a user click a hyperlink at left, the top navigation menu will change according the hyperlinks at left. And when the user click the hyperlink at top, it will display the required page at bottom right hand side.

I have no idea whether the navigation menu develop as frame, table or user control. Can anyone sharing your opinion? Thanks.Hello, the menu should be a usercontrol, and you should have a look at this page to know how to setp up your pages:

Master Pages

regards

Monday, March 26, 2012

Tabs in ASP.NET 2.0

Hello,

Question for all the .NET gurus. I would like to implement tabs in the web application I'm developing. Many that I've talked to and read are pointing me in the direction of AJAX. I would rather wait for another release of AJAX before I start using it, but my question is: Isn't tabs available in ASP.NET 2.0without getting AJAX? For example, when I go to the built in ASP.NET Web Administration Tool it obviously uses tabs and looks like it is built using ASP.NET 2.0 only. I like the look, feel and functionality of the Web Administration tool and want to implement something similiar in my Web Apps. So if this is using it, why can't I without having to get AJAX?

Thanks,

StrickHave a look at the MultiView control.
It kind of depends on what your goal is with the using the tabs.

If it's simply a style of site navigation, it's quite easy to create images and text that duplicate a simple tab look and feel inside a web control. I haven't looked at it closely but I think that's what the ASP.NET configuration web site does in most places. You could then place the control at the top of all of your pages and have it show the right tab for the loaded page. There are plenty of examples around if you Google for them. You can also buy more complex controls that give you more style, functionality, and ease of use options. It really depends on how much you want to code and draw yourself.

If you're wanting a more interactive solution on a single page, you can use the MultiView control to do that. However, you'll still need to code/draw the simulated tabs yourself in much the same way as mentioned above.

AJAX comes into play when you need to have a tabbed display where you want to submit or update parts of a page separate from the rest. For example, you might have an order form where you want to check current inventory levels and warehouse/store locations when a line item is added but you don't want to submit and refresh the whole page to do it.
Thanks guys. I'm going to look into the multiview. Really, I just want it to do the exact same thing that the windows tab control does. Hopefully I won't have to simulate a tab control. If that's the case, I might as well just have separate pages for each hyperlink. I want the multiview to save me the time of having to have separate pages.

Thanks,

Strick
I like the look, feel and functionality of the Web Administration tool and want to implement something similiar in my Web Apps.

The complete source code for the admin tool is in the following folder

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles
Nice, I'll take a look at that. Thanks!
this seems pretty cool:

http://ajax.asp.net/ajaxtoolkit/Tabs/Tabs.aspx
Yeah, I actually downloaded and played with AJAX a little bit last week. It seems really cool. It just seems like it's not integrated into VS 2005 like it should be. I was gonna wait for another version before I start really using it (which is usually my rule of thumb with brand new microsoft products, lol!), but maybe I'll break my rule for AJAX. Maybe I should go get an AJAX book and read it cover to cover...lol. Any recommendations on books?
Yeah, I actually downloaded and played with AJAX a little bit last week. It seems really cool. It just seems like it's not integrated into VS 2005 like it should be. I was gonna wait for another version before I start really using it (which is usually my rule of thumb with brand new microsoft products, lol!), but maybe I'll break my rule for AJAX. Maybe I should go get an AJAX book and read it cover to cover...lol. Any recommendations on books?
if you go to this link:
http://asp.net/learn/videos/default.aspx?tabid=63

and watch the first 2 vids, they will show you how to put the ajax resources and the AjaxConrolToolkit right inside of your toolbox. That makes them pretty much drag n' drop. I couldn't ask for much more integrated. ;)
U know what sucks now? I'm all ready to learn AJAX and the web host I'm with doesn't even support it yet
Well I think in this situation, u better to use MultiView or LoadControl Method either.

Tuesday, March 13, 2012

targetSchema gets reset

Following MS' recommendation, I have changed the targetNamespace of my
dataset in its .XSD file in a project I am (still) developing from the
default http://www.tempuri.org to something of mine, i.e. changed the line:
<xs:schema id="DataSetIC"
targetNamespace="http://www.tempuri.org/DataSetIC.xsd"
xmlns:mstns="http://www.tempuri.org/DataSetIC.xsd"
xmlns="http://www.tempuri.org/DataSetIC.xsd" ...>
Now, every time I change the database and ask Visual Studio .NET to
regenerate the dataset, it chucks away my changes and resets to
www.tempuri.org, which then fouls my integrations with the dataset.
Is there any way I can get VS .NET to retain my target namespace change?I too wish someone could explain this annoying problem, along with the
fact that (re)generating dataset for a dataadapter also throws away the
keys I defined in the DataSet
jb wrote:
> Following MS' recommendation, I have changed the targetNamespace of my
> dataset in its .XSD file in a project I am (still) developing from the
> default http://www.tempuri.org to something of mine, i.e. changed the line
:
> <xs:schema id="DataSetIC"
> targetNamespace="http://www.tempuri.org/DataSetIC.xsd"
> xmlns:mstns="http://www.tempuri.org/DataSetIC.xsd"
> xmlns="http://www.tempuri.org/DataSetIC.xsd" ...>
> Now, every time I change the database and ask Visual Studio .NET to
> regenerate the dataset, it chucks away my changes and resets to
> www.tempuri.org, which then fouls my integrations with the dataset.
> Is there any way I can get VS .NET to retain my target namespace change?
>
Uri,
That's very interesting. Because I have another post elsewhere
(http://communities2.microsoft.com/c...rk.aspnet&fltr=)
which is inspired by *just* what you say. I have suddenly noticed that in
the XSD I had manually defined a unique constraint on behalf of a unique (bu
t
not primary) key I had in my SQL and it gets removed when I regenerate.
Isn't that exactly what you're talking about? I'm tryinjg to find an articl
e
which describes precisely whatever it is that the (re-)generator does or doe
s
not do, so that I can take this into account -- any ideas?
"Uri Dor" wrote:

> I too wish someone could explain this annoying problem, along with the
> fact that (re)generating dataset for a dataadapter also throws away the
> keys I defined in the DataSet
> jb wrote:
>
Uri,
That's very interesting. Because I have another post elsewhere
(http://communities2.microsoft.com/c...rk.aspnet&fltr=)
which is inspired by *just* what you say. I have suddenly noticed that in
the XSD I had manually defined a unique constraint on behalf of a unique (bu
t
not primary) key I had in my SQL and it gets removed when I regenerate.
Isn't that exactly what you're talking about? I'm tryinjg to find an articl
e
which describes precisely whatever it is that the (re-)generator does or doe
s
not do, so that I can take this into account -- any ideas?
"Uri Dor" wrote:

> I too wish someone could explain this annoying problem, along with the
> fact that (re)generating dataset for a dataadapter also throws away the
> keys I defined in the DataSet
> jb wrote:
>
I believe we're talking about the same thing. Regarding the article -
haven't seen such an article yet.
jb wrote:
> Uri,
> That's very interesting. Because I have another post elsewhere
> (http://communities2.microsoft.com/c...rk.aspnet&fltr=)
> which is inspired by *just* what you say. I have suddenly noticed that in
> the XSD I had manually defined a unique constraint on behalf of a unique (
but
> not primary) key I had in my SQL and it gets removed when I regenerate.
> Isn't that exactly what you're talking about? I'm tryinjg to find an arti
cle
> which describes precisely whatever it is that the (re-)generator does or d
oes
> not do, so that I can take this into account -- any ideas?
> "Uri Dor" wrote:
>

targetSchema gets reset

Following MS' recommendation, I have changed the targetNamespace of my
dataset in its .XSD file in a project I am (still) developing from the
default http://www.tempuri.org to something of mine, i.e. changed the line:

<xs:schema id="DataSetIC"
targetNamespace="http://www.tempuri.org/DataSetIC.xsd"
xmlns:mstns="http://www.tempuri.org/DataSetIC.xsd"
xmlns="http://www.tempuri.org/DataSetIC.xsd" ...
Now, every time I change the database and ask Visual Studio .NET to
regenerate the dataset, it chucks away my changes and resets to
www.tempuri.org, which then fouls my integrations with the dataset.

Is there any way I can get VS .NET to retain my target namespace change?I too wish someone could explain this annoying problem, along with the
fact that (re)generating dataset for a dataadapter also throws away the
keys I defined in the DataSet

jb wrote:
> Following MS' recommendation, I have changed the targetNamespace of my
> dataset in its .XSD file in a project I am (still) developing from the
> default http://www.tempuri.org to something of mine, i.e. changed the line:
> <xs:schema id="DataSetIC"
> targetNamespace="http://www.tempuri.org/DataSetIC.xsd"
> xmlns:mstns="http://www.tempuri.org/DataSetIC.xsd"
> xmlns="http://www.tempuri.org/DataSetIC.xsd" ...>
> Now, every time I change the database and ask Visual Studio .NET to
> regenerate the dataset, it chucks away my changes and resets to
> www.tempuri.org, which then fouls my integrations with the dataset.
> Is there any way I can get VS .NET to retain my target namespace change?
Uri,

That's very interesting. Because I have another post elsewhere
(http://communities2.microsoft.com/c...rk.aspnet&fltr=)
which is inspired by *just* what you say. I have suddenly noticed that in
the XSD I had manually defined a unique constraint on behalf of a unique (but
not primary) key I had in my SQL and it gets removed when I regenerate.
Isn't that exactly what you're talking about? I'm tryinjg to find an article
which describes precisely whatever it is that the (re-)generator does or does
not do, so that I can take this into account -- any ideas?

"Uri Dor" wrote:

> I too wish someone could explain this annoying problem, along with the
> fact that (re)generating dataset for a dataadapter also throws away the
> keys I defined in the DataSet
> jb wrote:
> > Following MS' recommendation, I have changed the targetNamespace of my
> > dataset in its .XSD file in a project I am (still) developing from the
> > default http://www.tempuri.org to something of mine, i.e. changed the line:
> > <xs:schema id="DataSetIC"
> > targetNamespace="http://www.tempuri.org/DataSetIC.xsd"
> > xmlns:mstns="http://www.tempuri.org/DataSetIC.xsd"
> > xmlns="http://www.tempuri.org/DataSetIC.xsd" ...>
> > Now, every time I change the database and ask Visual Studio .NET to
> > regenerate the dataset, it chucks away my changes and resets to
> > www.tempuri.org, which then fouls my integrations with the dataset.
> > Is there any way I can get VS .NET to retain my target namespace change?
Uri,

That's very interesting. Because I have another post elsewhere
(http://communities2.microsoft.com/c...rk.aspnet&fltr=)
which is inspired by *just* what you say. I have suddenly noticed that in
the XSD I had manually defined a unique constraint on behalf of a unique (but
not primary) key I had in my SQL and it gets removed when I regenerate.
Isn't that exactly what you're talking about? I'm tryinjg to find an article
which describes precisely whatever it is that the (re-)generator does or does
not do, so that I can take this into account -- any ideas?

"Uri Dor" wrote:

> I too wish someone could explain this annoying problem, along with the
> fact that (re)generating dataset for a dataadapter also throws away the
> keys I defined in the DataSet
> jb wrote:
> > Following MS' recommendation, I have changed the targetNamespace of my
> > dataset in its .XSD file in a project I am (still) developing from the
> > default http://www.tempuri.org to something of mine, i.e. changed the line:
> > <xs:schema id="DataSetIC"
> > targetNamespace="http://www.tempuri.org/DataSetIC.xsd"
> > xmlns:mstns="http://www.tempuri.org/DataSetIC.xsd"
> > xmlns="http://www.tempuri.org/DataSetIC.xsd" ...>
> > Now, every time I change the database and ask Visual Studio .NET to
> > regenerate the dataset, it chucks away my changes and resets to
> > www.tempuri.org, which then fouls my integrations with the dataset.
> > Is there any way I can get VS .NET to retain my target namespace change?
I believe we're talking about the same thing. Regarding the article -
haven't seen such an article yet.

jb wrote:

> Uri,
> That's very interesting. Because I have another post elsewhere
> (http://communities2.microsoft.com/c...rk.aspnet&fltr=)
> which is inspired by *just* what you say. I have suddenly noticed that in
> the XSD I had manually defined a unique constraint on behalf of a unique (but
> not primary) key I had in my SQL and it gets removed when I regenerate.
> Isn't that exactly what you're talking about? I'm tryinjg to find an article
> which describes precisely whatever it is that the (re-)generator does or does
> not do, so that I can take this into account -- any ideas?
> "Uri Dor" wrote:
>
>>I too wish someone could explain this annoying problem, along with the
>>fact that (re)generating dataset for a dataadapter also throws away the
>>keys I defined in the DataSet
>>
>>jb wrote:
>>
>>>Following MS' recommendation, I have changed the targetNamespace of my
>>>dataset in its .XSD file in a project I am (still) developing from the
>>>default http://www.tempuri.org to something of mine, i.e. changed the line:
>>>
>>> <xs:schema id="DataSetIC"
>>>targetNamespace="http://www.tempuri.org/DataSetIC.xsd"
>>>xmlns:mstns="http://www.tempuri.org/DataSetIC.xsd"
>>>xmlns="http://www.tempuri.org/DataSetIC.xsd" ...>
>>>
>>>Now, every time I change the database and ask Visual Studio .NET to
>>>regenerate the dataset, it chucks away my changes and resets to
>>>www.tempuri.org, which then fouls my integrations with the dataset.
>>>
>>>Is there any way I can get VS .NET to retain my target namespace change?
>>>
>>

TAX RATES

I am developing a web site with ASP.NET and C# and I need to know whattax rates should be added to theprice of aproduct so I could implement the application accordingly.

Could someone tell me if the tax rate added to the price of a product sold in a online e-commerce web site is the one existing in1) the country of theperson who bought the product,2) the country where theweb owner site resides,3) the country where theserver hosting the web site resides or4) the country where theowner registered his company ( supposing he did so ) ?

And what would be the situation if the e-commerce web siteowner works just asself-employed and did not register the web site as company ?

I am not certain how this works in the UK, but I can give you some general ideas of how this works in the US and possible applications abroad. Generally in the US, sales tax is fairly straight-forward on when to apply it:

E-commerce tax always applies to where the product is being shipped (not necessarily where the person buying the product is located). If my business is in NY, and someone in CA buys something from me, and that product is also being shipped to CA, then the sales tax that gets applied is the CA tax rate. Other applications:

1) If the person buying your product resides in the same state as your business, you charge them sales tax. Since the buyer and seller are in the same state, it is that state tax rate that gets applied.

2) If the person buying product from you lives in the same state as any of your operation locations, you charge them sales tax. If my business has locations in NY, CA, and TX, then I must charge sales tax for any product being shipped to these states. My head-quarters may be in NY, and all my product may ship from NY, but because I have operations in CA, I have to charge sales tax to anything being shipped to this state.

There is new initiatives out now that take this down to the county level. So if I am required to charge sales tax for products being shipped to CA, I may also have to determine which county in CA I am shipping to and charge the sales tax rate that is established in that specific county. So someone in northern CA may actually pay a lesser tax rate than someone in southern CA because they are in different counties, even though they both live in the same state.

So in general,tax applies to the location the product is beingshipped to, regardless of where the person buying is located. The person buying may be in CA, but if he is having the product shipped to another state that does not require me to charge sales tax, then no sales tax is applied for that order. Hopefully that makes sense.

I do not believe there are any requirements for charging a sales tax on over-seas orders, but I have not dealt with any of these scenarios in my experience. It is probably up to the country's laws that the product is being shipped to as well. In your case, if you ship from UK to the US, that order would probably be subject to US tax laws. You should probably seek a professional tax consultant on this.

You're last question is probably a gray area and I am sure there are loopholes to exploit, depending on the type of business you are and the product you are selling.

Thank youRossoneri.

It was a very informative post.