|
Thank you Deepak,
I refered that link but in that, Country and State are hardcoded (Storing in Array) but my requirment is I should get from DataBase.
I searched in Google but i dint get sample code using Database.. please guide me
|
|
|
|
|
hi iam writting the if contdition in this way is this condition works
if((st1 <>0 and st2 is null)or(st1 =0 and st2 is not null)) then
do some thing
else
do some thing
end if;
|
|
|
|
|
This is the wrong forum for a SQL question.
No, it's not valid. Variables in a proc start with @.
Actually, that's the least of your worries. Ask in the right forum.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
k sir i start with @ for the variables then it works?think that the variables are having @
|
|
|
|
|
No, it's definately got more issues. I suggest you buy a book on SQL, and that you ask in the right forum. Try providing some context when you post in the SQL forum.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Mr.Christian Graus - Microsoft MVP - C++ thanks 4ur valuable advice now i started to buy a book
|
|
|
|
|
Hi All,
I have one application in asp.net which contains one datatgrid.
I have onr problem with datagrid.I have one buttoncolumn in datagrid.but when i click on that button but that button doesn't responde.what i do?
second problem is when i click on that button i want to take printout of the page.so i want code of printout using asp.net with vb.net.
Thanks
monika
|
|
|
|
|
monika_vasvani wrote: I have onr problem with datagrid.I have one buttoncolumn in datagrid.but when i click on that button but that button doesn't responde.what i do?
Make sure events are attached properly
monika_vasvani wrote: i want to take printout of the page.so i want code of printout using asp.net with vb.net.
Taking print out is not an ASP.NET process. It happens on the client. You can use JS for this. You will get many examples if you do a search on google.
|
|
|
|
|
Hi all,
I have a FormView, which retrieve data from an ObjectDataSource.
In the ItemTemplate of the FormView I have a label which shows a datetime field fo the ObjectDataSource. The Label's Text propery is binded using the following Bind() directive:
Text='<%# Bind("BeginDate", "{0 /M/yyyy}") %>'
In the EditTemplate, I have a TextBox which is binded to the BeginDate field, using the following directive:
Text='<%# Bind("BeginDate", "{0 /M/yyyy}") %>'
As you can see, I want to use a d/M/yyyy data format.
In the ReadOnly state of the form I can see that the date is correctly showed (for example 25/12/2007). When I press the "Edit" button and the formview switch to the Edit state, the date is still showed in a correct format d/M/yyyy.
The issue is the following: when I press the "Update" button, I got a Parsing Exception: the data in the textbox is not a valid DateTime format. If I manually change the data from d/M/yyyy (25/12/2005) in M/d/yyyy (12/25/2007) the update process works!
It seems that when the FormView render the EditTemplate, it use a datetime format d/M/yyyy but when it parse the datetime, it uses the M/d/yyyy datetime format.
I checked the CultureInfo and UICultureInfo and it was set to it-IT.
I set the CultureInfo for the CurrentThread to it-IT, but it didn't solve the problem.
Can you help me?
Thanks
Federico
|
|
|
|
|
Hi Federico,
I have been able to recreate the issue. I would suggest you to please check if the backend server supports the particular date time format.
In my case, I have been able to change the date time format on the SQL Server and have been able to workaround this..
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Hi Sam,
thanks for your help.
Actually I'm developing my code using the SQL 2005 Express embedded in the VS2005.
During my tests, I saw that the parsing error exception was throw before the execution of the UPDATE query. It seems that it's .NET that wrong doing the parsing of the datetime, because it uses a english date time format.
When I'll move my code on a SQL 2005 server, I wish that the issue will vanish.
Thanks for your help.
Regards.
Federico
|
|
|
|
|
|
Hi All,
I have a problem, i need to include ".inc" file in to my ".aspx" file as i have some code in the inc file which i have to re-use. can any one suggest me how to do this,
I need to include the file to access the database details which are in the ".inc" file.
Thanks in Advance.
chandu
chandu
|
|
|
|
|
<!--#include file="myfile.aspx"-->
I wouldn't advise you to use includes though. They were useful in the days of classic ASP as a means of reusing script code. However the object-orientated nature of .NET means there are more sophisticated means of reusing code e.g. Master Pages, User Controls etc. Anyway, database connection details should be stored in your web.config file. There is a specific <connectionstrings/> section for them.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Your database code should be in a class, or in a dll. It sure should not be included with .inc files.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi All,
I struck against the meaning of user control. Please i need your comments for this issue
As per my knowledge we use user control when there is reusable logic and UI present in the web application.
But here I am allocated to a new project where they are using one user control for each page just to simplify the amount of logic that is on the page.
Means they have almost n number of user controls for n number of pages. Is it proper way? Do we need to have concern for performance issue
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
If you are using ASP.NET 1x, the answer is Yes. It should not be defined to have one user control for one page. There might be some pages that share the same user control. And also, there might be some pages that have more than one user control.
playing with bugs ) wrote: As per my knowledge we use user control when there is reusable logic and UI present in the web application.
plus, the reason why we used to use the user control is that we want to create the basepage for website themes.
|
|
|
|
|
Michael,
Thanks for giving your comments
Michael Sync wrote: If you are using ASP.NET 1x, the answer is Yes.
I am using ASP.NET 2.0. What makes the difference between 2 ?
Michael Sync wrote: plus, the reason why we used to use the user control is that we want to create the basepage for website themes.
We can use master page for this.
So what should we conclude ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
playing with bugs ) wrote: I am using ASP.NET 2.0. What makes the difference between 2 ?
If you are using ASP.NET 2.0, one user control for one page won't be needed for you anymore.
For performance, I don't think that there is any differences between the page and user control..
|
|
|
|
|
Michael
but if i would have using ASP.NET 1.x then why i can use one user control for 1 page ? Means what makes this difference in 2.0 ..
i don't know my question is making any sense or not ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
When we were using ASP.NET 1x, there is no build-in master page. So, we had to create the base class for that and added the user control dynamically to the page.. but when we moved to ASP.NET 2.0, we don't need that concept anymore..
|
|
|
|
|
Hmm
Thanks Buddy
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
playing with bugs ) wrote: As per my knowledge we use user control when there is reusable logic and UI present in the web application.
Are you speaking about ascx files ? I think master pages are a good replacement for this.
playing with bugs ) wrote: But here I am allocated to a new project where they are using one user control for each page just to simplify the amount of logic that is on the page.
I don't find any problem in in this design. There might be some reason that they chose this method. May be the user controls was developed by one programmer, and ASPX pages are done by other. So the person who created ASPX pages, don't need to understand what's happening inside the user control. I think it's for easy maintainability.
You need to identify, why they used such a method. I don't think that it will make performance problems.
|
|
|
|
|
Navaneeth,
thanks for your comments
N a v a n e e t h wrote: Are you speaking about ascx files ?
Yes i am saying ASCX files.
N a v a n e e t h wrote: I think it's for easy maintainability
That's what i wanted (specific answer)
What will you say to this sentence.Please give your comments
The user controls are used to simplify the amount of logic that is on the page
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
playing with bugs ) wrote: The user controls are used to simplify the amount of logic that is on the page
Well, I think when you use user controls, your logic is not getting simplified. But your code is getting simplified and gives easy readability. Commonly used things can be put in one centralized place.
|
|
|
|