|
use CheckBox.CheckedChanged Event
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
CheckedChanged event isn't in classic asp.
|
|
|
|
|
This is the ASP.NET forum. For outdated and obsolete technologies, try the web development forum,
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I inherited a project that was configured to run a file based Web Site using the ASP.NET Development Web Server. I want to switch this over to run using IIS. I have been looking through the project options but I cannot find how to go about switching this without creating a whole new project. Am I missing something?
Regards,
Jeff
|
|
|
|
|
Right click Website->Properties->Web->Select Use IIS Web Server Radio button and provide the URL.
|
|
|
|
|
I don't have that option... is this only in VS2008.
|
|
|
|
|
It was for VS2005 but you should be able to find that setting somewhere in Project Properties page.
|
|
|
|
|
The topic subject mind sounds familiar to some of you.
My problem
An Asp.NET website (3.5) with AJAX has a USER CONTROL.
This Control exists of a Label and of a DropDownList.
In my WebPage I consume the control and that works.
In the control I have stated:
<code>
public event EventHandler SelectedIndexChanged;
protected void Page_Init(Object sender, EventArgs e)
{
this.SelectedIndexChanged += new EventHandler(DDL_Osic);
}
protected void DDL_Osic(Object sender, EventArgs e)
{
if (this.SelectedIndexChanged != null)
this.SelectedIndexChanged(sender, e);
}
</code>
and in the ASPX of the User Control
<asp:DropDownList runat="server" ID="ddlTBM" CssClass="PromptValue" Width="100%"
AutoPostBack="true" OnSelectedIndexChanged="DDL_Osic"/>
In the Webpage it says in the aspx
<uc1:PromptSelecteerTBM ID="PromptTBM" runat="server"
OnSelectedIndexChanged="PromptTBM_OSIC" />
In the codebehind of the webpage:
protected void PromptTBM_OSIC(Object sender, EventArgs e)
{
LaadTBMZones(0);
}
And now the problem:
What happens that if I change the selection of the DropDownList the event of the usercontrol is fired, it goes to the method in the webpage, than returns to the event/method of the usercontrol and returns to the codebehind of the webpage and then back again...and so on
What did I do wrong? How to stop this loop?
|
|
|
|
|
SelectedIndexChanged triggers DDL_Osic, which calls SelectedIndexChanged, which triggers DDL_Osic, and so on... that's your loop.
I really do not understand why you add the handler in Page_Init and in aspx, either...
(i've tried posting a similar message a minute ago but i think it crashed, sorry if it actually had posted it and you're gonna see it twice. Though if it crashes again, i'm not gonna type it again
|
|
|
|
|
Hey Greg,
I added the handlers to both sides because I saw plenty of examples with this. Well if there is 1 too many, which should be removed?
|
|
|
|
|
Don't worry about that, honestly. Whichever you get rid off makes no difference, it's still gonna trigger.
Worry about your handler though and get rid of the part that says:
this.SelectedIndexChanged(sender,e);
in your DDL_Osic method, though, and add some proper logic to what the program should do at this point. As in what should happen, when the selection has been changed. If DDL_Osic triggers, means it CAUGHT the event. No need to call it again
|
|
|
|
|
the point is this:
As soons as the usercontrol ddl has changed it selectedindex the webpage should call a method to fill a Gridview which is outside of the usercontrol but in the page.
So if I remove the this.SelectedIndexChanged(sender,e); How can I fill the gridview autoside the ussercontrol with data?
|
|
|
|
|
This is what i'd do.
Forget about the code behind of the UserControl, make that Dropdown public in the usercontrol class and on the main aspx add the handler, (Page_Init, Page_Load):
private void Page_Load()
{
(yourusercontrol).(YourDropdownInUserControlId).SelectedIndexChanged += new EventHandler(s_SelectedIndexChanged);
}
private void s_SelectedIndexChanged(object sender, EventArgs)
{
}
Hope this works for you
|
|
|
|
|
Yeah,
this even works better!
This component is used over several pages in the system and only in 1 page it should do OnSelectionChangedIndex event. So the other pages have no interference with this.
COOL and many thanx
|
|
|
|
|
FOUND IT
just remove
//if (this.SelectedIndexChanged != null)
// this.SelectedIndexChanged += new EventHandler(this.DDL_Osic);
in the page_init in the user control. That was the devil that bit me this afternoon!
thanx for your input.
|
|
|
|
|
How can I quit completely from master page. End all sessions and go back to login page
Sessio.abandon() or Session.Clear seem not working
|
|
|
|
|
Hi,
Use Session.Remove("SessionVariable")
and check on master page load, if session is nothing then redirect your
login page
|
|
|
|
|
onyang2 wrote: Sessio.abandon() or Session.Clear seem not working
Why? How did you know that they are not working ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Fine Fine . What I did was to set a logout immagebutton to have a postback Url to be
"master page" and at the same time code click event to abandon session. I have noticed that
it did not recognize the coded click event but the postback. so it works after removing postback Url, but i think
such like confusions Microsoft should address instead of using common sense.
|
|
|
|
|
Hi,
some time i get this error :
Exception: System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %>
|
|
|
|
|
egainz wrote: ]]>
add
EnableEventValidation="false" in page attribute
|
|
|
|
|
Can I suggest that if you take the advice already given, you make sure you fully understand its implications. There are security considerations here.
|
|
|
|
|
can any one guide me that i have a update panel on page
which contains two drop down list country and city on selected index change i am loading cities .
on local machine and lan it works fine ....
but when i host this application on server and try to change country i takes around 3 minutes to load cities i have tried my best to identify the problem.. but failed does any one have idea how to resolve this problem....?????
umerumerumer
|
|
|
|
|
this problem is for server peformance
as your request is taking a lot time to get completed
|
|
|
|
|
ok thanks for reply then what do you recommend in order to solve this problem????
umerumerumer
|
|
|
|