|
try using server.transfer...check ispostback property
|
|
|
|
|
Try checking if your button's AutoPostBack = true.
modified 27-May-14 5:06am.
|
|
|
|
|
Hi All,
I am using VS 2008, 3.5 and am trying to add drag and drop functionality to the treeview. However, the allowdrop property is non existent on the treeview control.
I am baffled as to why this is the case.
Even when Ive instantiated the control it is neither existant nor does it appear behind the server control. help is much appreciated.
Kind Regards
|
|
|
|
|
|
Hello, I've been working on an e-commerce site for a couple of weeks. I'm at a point where I want to use a datalist to display a subset of my catalog. Well, nothing in the datalist displays when I bring up the page in IE with either IIS 7 or VS built-in iis server.
I've isolated a simple piece of code that illustrates my dilemna within a defalut.aspx file:
<form id="form1" runat="server">
<div>
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
Hello!
</ItemTemplate>
</asp:DataList>
</div>
</form>
This page should show: "Hello", yet the page is blank. More configuration details:
- running Windows 7
- VS 2008
- IIS 7
Any assistance or suggestions to point me in the right direction would be greatly appreciated. Thanks in advance.
|
|
|
|
|
on page loadon the server side , you are missing the following code
DataList1.DataBind();
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I apologize, I knew there was something I left out. This is what I had in the code-behind:
protected void Page_Load(object sender, EventArgs e)
{
DataList1.DataBind();
}
So, I have a "Default3.aspx" file with the DataList1 control, and a "Default3.aspx.cs" file with the DataBind() call.
|
|
|
|
|
jboyd111 wrote: DataList1.DataBind();
That's OK, but you need to tell the datasource from where the data is to be used.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I uploaded the default aspnetdb.mdf database an my web server but i still cannot figure out a way to make my web application interface with de data base.
the connection string on my localhost is:
Data Source=.\SQLEXPRESS;AttachDbFilename="D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB.MDF";Integrated Security=True;User Instance=True
could any1 pls help me modify it to a working connection with a web server?
|
|
|
|
|
Do you get any Errors ? and what are the Erros ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Do not attach file when you are in the production server, rather do like this :
1. Create a Login for ASPNET Account to the SQL Server instance
2. Attach the ASPNET.MDF file to the SQL Server itself using
CREATE DATABASE [ASPNET] ON <br />
( FILENAME = N'D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB.MDF' ),<br />
( FILENAME = N'D:\Documents and Settings\Abdulhafeez\Desktop\Runningcodes\App_Data\ASPNETDB_log.LDF' )<br />
FOR ATTACH<br />
Run it in Master Database.
|
|
|
|
|
I still did not get the explaination you did. pls explain it to me cos am a bit too dol.
|
|
|
|
|
I meant you need to attach the database to a database instance installed in your operating system.
|
|
|
|
|
try changing the AttachDbFilename attribute in Connection string. It might help you.
Data Source=.\SQLEXPRESS;AttachDbFilename="|DataDirectory|ASPNETDB.MDF";Integrated Security=True;User Instance=True
|
|
|
|
|
Hi,
Has any one used AOP yet? What's the use of doing it this way?
Any helpful articles with some decent tutorials/explanations for beginners?
Regards,
Brendan
|
|
|
|
|
>> What's the use of doing it this way?
By using AOP you can model cross cutting concerns and apply these to the rest of your model.
Think about how how inheritence works for OOP.
Inheritance in OOP makes it possible to reuse code from a baseclass to a subclass.
In a similair way you can reuse code via AOP.
Lets say you need logging in all your business methods.
Then you can apply the same logic onto all of them via AOP.
So you can think of it as inheritence at method level, you let a method inherit logic.
These magic fragments of code are called an "interceptor" or an "advice"
The most naive and obvious usages of AOP is logging and security.
But there are lots of other usecases.
Personally I used AOP (using my own framework NAspect) to apply things like data binding support and dirty tracking onto ordinairy classes.
One common argument against AOP is that it makes it hard to see what happens.
e.g. you can not see that the logging code will execute when you look at the code.
This is true, and could be a problem.
This is ofcourse a very simplified view on AOP, but I hope it gives some idea on what it can do.
|
|
|
|
|
Hi all,
I have problem when I deploy my website to the server,Im using Copy web site tools with ftp .
I've tried to copy the file to public_html but there nothing only the directory files.
this the web site
www.mohamedkhalil.org
|
|
|
|
|
|
you not doing it correctly. why do you do it ftp way ?
1)create a virtual directory on the IIS
2) Copy the File to that Directory
3) Configure the Security and .net if its not configured
and browse your site. its simple that way
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi dr.nokia,
We are generally using publish website method for deployment. Can you try this method ???
If you have any doubts in publish, please contact me !
Thanks & Regards,
Jeneesh k. v.
|
|
|
|
|
hii,
i am using rolemembership in my website.i created two roles administrator and user.
but it is not identifying the role of users ie:admin or user whenever i login.however login is successful.but i am unable to open my website admin panel which is accessible by role("administrator").
what changes shud i do in my web config to solve this problem.plz guide.
Thank's
|
|
|
|
|
Start here[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hey Mark, Happy new year !!!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hello all,
Not sure if anyone has seen or heard of this problem before, but it has me stumped and google has failed to help in my search for an answer so far...
I am trying to use a couple of Application Variables on my site, but they keep disappearing.
I am storing the values I want them to hold in a config table in an SQL Db, then on application start I fetch the config values and turn them into Application variables so that I don't need everyone connecting to the db each time they need to be used which is very frequently.
I know making changes to the web.config file restarts the application, and that's not what's causing the problem. No class files are being changed or even pages updated, and yet the application variables just vanish, sometimes twice a day, sometimes once a week.
I have written an admin page to reset the varibles so it can be done nice and quickly, but I can't seem to find out what the problem is, I only seem to get it on my live server, not my test one. it's a Win 2003 box and the sites .net 3.5 if that helps at all?
Any help/advice would be appreciated.
Thanks in advance
mark
|
|
|
|
|
Check if your application variable getting lost coincides with IIS worker process recycling. IIS Worker process gets recycled based on various conditions like number of inputs serviced, time to live, etc and is configurable. But, it has to be recycles no matter what.
If this is the case then, it explains why you do not face this on your test server, since the no of hits on your test server is nowhere near what you get on the Live server.
The solution for your problem would be to use a sliding expiration scheme to auto expire/refresh the data on a time bound/unavailability basis. Alternatively, you can also modify the get property of the application variable to check if the data is available and fetch it from the server if it is not available. Doing this would ensure that your application does not fail and there is no need for manual intervention.
HTH!
Have a Great Year ahead!
|
|
|
|