|
In the event handler, the object passed in is the control that rtiggered it
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
I am using "MultiView", "GridView", "DetailsView" and many others controls in my page.I am also using session. when i run my page no problem happen. but after few minutes when i click any button (any postback) this error show :
"Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request."
pls help me. this problem also happen in my others pages.
Thahks
Rico.
|
|
|
|
|
This means that you are adding controls dynamically so that the control tree is different on postback.
Christian Graus
Please read this if you don't understand the answer I've given you
"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
you have added the controls cynamically.
put that code in a function and call it from both
from page load and from your necessary place like button click
thanks
|
|
|
|
|
Could anybody help me out what might be the problem.
I have developed an ASP Project using VB.Net 2005. Earlier the project was running fine with a SQL Server 2005 server that was installed in a different server. When i change the server to the local Server it is not running. If i run the project directly from the VB.Net environment it is running with an additional port address in the address bar of Internet Explorer. But when i try to run it derectly from Internet Explorer the firt page is displayed i.e., the login page. And when i click on the Login button it show connention not available.
Could anybody help me out what might be the problem.
Thanks in advance.
Sekhar
|
|
|
|
|
The problem is that your site ( which is NOT ASP, but ASP.NET, I am willing to bet ), is not configured to use the local SQL Server.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
hmm , do one thing open yr IIS , select yr localserver - > websites -> default websites
IN default websites find yr project name if there then right click on that select properties and select tab virtual directories, see the application name textbox is have value or not , if not then press create button and select OK
May be yr problem will be solved
|
|
|
|
|
Hi I need some help with the drop down list in Visual Web Developer 2005. My problem is as such:
1.) I have a total of 50 categories in my DB.
2.) When I use a drop down list , it displays all 50 entries at once. I want to limit the number of displayed entries to 10, so that the user will have to scroll down to view the rest. Plus the fact that the 50 entries practically covers up 1/4 of the screen.
Please help.
Thank You.
|
|
|
|
|
You could try writing your own control that shows a scrolling div, I guess.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
That's what I thought too, but I dun really have a idea of how to do it.
|
|
|
|
|
Yeah, it's a bit of work. You'd need to have the div, toggle if it was shown by a click, then set your textbox text based on a selection.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
http://aspalliance.com/541_Multiple_Column_DropDown_Box_for_ASPNET
see this link i hope this will help u.
|
|
|
|
|
Hello all,
I have a Mster Page contained some control for Search:DropDownList,TextBox,Button
I have another page named Search.aspx
i don't know how i can access the textbox in query:
switch((Master.FindControl("DropDownList1") as DropDownList).SelectedValue)
{
case "Title":
DataList1.DataSource = SqlDataSource1;
break;
.
.
.
}
my sqldatasource1 :select * from table where title=myTextbox.text
but i don't know how i can access to this textbox that placed in master page.
i don't know this work for Searching is true or no,if it's false i be glad for your saying.
Thank you,
Hoda
|
|
|
|
|
The way I'd do it is this:
write a base class for all your pages.
Add a property there that returns your specific Master page class, not the generic class you get from the base page.
To the master page, add a public propery to get the text from the textbox.
FindControl is just nastiness, why go searching when you can specify where it is ?
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
add this direcvtive in html
]]>
and you can access the master pages text box like
MasterPage pg = new MasterPage();
TextBox tb = (TextBox)pg.FindControl("Text1");
|
|
|
|
|
Can anyone recommend excellent courses, seminars, or training for ASP.net developers?
Our firm has a junior-level developer who has some Java experience and is learning C# and ASP.net on the job. But we'd like to make sure she learns smart practices and not just the standard Microsoft Kool-aid.
Who are the best companies providing courses & training?
Any recommendations would be VERY much appreciated!
-Al Mann
|
|
|
|
|
Hi,
I have seen many websites where pages are created runtime , for example if I create post a property in in property site then what i have given in property name , that aspx page is created according to that page at runtime.
How can i create pages at runtime.
and Is there any pitfalls in creating pages at runtime.
modified on Wednesday, May 14, 2008 12:34 PM
|
|
|
|
|
You need to use URL rewriting to do this.
Don't you just hate coming up with something to put here?
|
|
|
|
|
|
|
Three forums.
Does it matter what I write here? Someone just has to say something about it.
|
|
|
|
|
hai all,
How to create PDF files from Database in .NET??Is there any free component available for this?? Thanks in advance!!!!
with Regards,
Imthiyas Ahamed.A
|
|
|
|
|
Imthu wrote: Is there any free component available for this??
I don't know but there is a free component[^] available for researching it
led mike
|
|
|
|
|
hi friends..
i used the following code to disable the browser back button.
but its not working, until i clicked any button.
Code i used :
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetExpires(DateTime.Now.AddDays(-1))
Response.Cache.SetAllowResponseInBrowserHistory(False)
Thanks in advance..
cheers..
|
|
|
|
|
This won't kill the back button, it will just force the page to reload when you go back.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|