|
Thanks Alex but if I do it with the way you have indicated, I won't be able to control the events of these dropdownboxes which must be defined in aspx page.
For example, let say that I have a dropdownbox inside the formview and I want to control its OnChangeCommand="Mybox.SelectedIndexChanged".
An error occurs when you do that because it rejects not to use such definition for the dropdownbox. This problem turned in to a disaster for me.
Thanks for your help. I really much appreacited.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
JUNEYT wrote: but if I do it with the way you have indicated, I won't be able to control the events of these dropdownboxes which must be defined in aspx page
Yes you can access any event of the server control no metter if it is in the page, or inside a formview, or inside a formview which is inside another formview, it doesnt matter
To add an event to a dropdownlist, it is like with any other control
To add the default event of the control, just double click it, for the dropdownlist, the defult event is the selectedindexchanged
If you need another event, select it in the design view, in the properties window (F4) select the button that shows the events instead of the properties, select the event you want and double click it, this will generate the event in the code behind, then program your stuff as you normally would
Let me know if you are able to do it or if you have any doubts
Alexei Rodriguez
|
|
|
|
|
salam aghaye vaziri
http://www.IrExpert.ir?22439
|
|
|
|
|
The correct answers are A and C.
Why is C the correct answer and not D?
Shouldnt i set enablePasswordRetrieval = true to let the user retrieve the password?
Thanks for any comments
================================
You create a Web Form. The Web Form allows users to recover their passwords. You add a
PasswordRecovery server control by using the following code
segment.<asp:PasswordRecovery runat="server"/>You need to ensure that the server
control generates a new password and sends it by e-mail to the users e-mail address.
Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)
A. Create a valid <smtp> definition in the Web.config file.
B. Set the passwordFormat attribute of the configured membership provider to Encrypted.
C. Ensure that the enablePasswordRetrieval attribute of the configured membership provider is
set to False.
D. Ensure that the enablePasswordRetrieval attribute of the configured membership provider is
set to True.
Answer: A, C
Alexei Rodriguez
|
|
|
|
|
Because the question states that you need to generate and send a NEW password for the user, NOT allow them to retrieve their current one.
|
|
|
|
|
I would like to make a HttpHandler that looks for querystring and edits the image (let's say jpg) as specified. I can do all this and it works great. My issue is since every JPG is being sent to the handler what do I do if I want it to not do anything? I tried to Server.Transfer to the requested image when the querystring is 0 but that basically makes a loop. I figure I can have the handler read the file image then save it to the output stream with no edits but I don't want the server doing the extra work for nothing. Is there and easy way to do this? Is to a lot of extra work for the server to read and dispose rather than just hand the file over? Is there a better way to write the Web.config (currently I have <add verb="*" path="*.jpg" type="HTTPHandlers.PicHandler> )? Am I going about this all wrong? Thanks for any help given.
I am using ASP.NET 2.0 with VB.NET code behind.
<div class="ForumMod">modified on Sunday, October 5, 2008 12:19 PM</div>
|
|
|
|
|
well, *something* has to handle the request - if not your custom handler then .NET itself, so as long as you pass it straight back if no editing is required I wouldn't worry too much...
If [condition] Then
' amend image
...Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg)
Else
' send original image straight to browser
context.Response.ContentType = "image/jpeg"
context.Response.WriteFile([FilePath])
End If
Otherwise, if you can separate your images into different folders such that all those that need amending are all in a particular folder then you can re-write the path="*.jpg" attribute in your web.config accordingly...
|
|
|
|
|
Can the ASP.NET cache be purged from a HttpModule? I need the code for each page to rerun after I purge certain data that I track in a HttpModule. However when I attempt to get the cache (HttpRuntime.Cache) it doesn't seem to contain anything. However, when debugging it, the code in the page does not get executed the second time through and perfmon asp.net total cache shows there are items. I am using the CommerceAD (IBuySpy.com) for my testing.
Does anyone know what is going on or how to purge this cache so that the page code will run the second time through? I would prefer to just be able to purge the cache when I need torather than disable it entirely.
Thanks.
|
|
|
|
|
Hi
Excuse me for this post, i don't found correct forum for post sharepount problem in codeProject.
Anyway, i want to add my custom calender (Persian Calender) to my sharepoint, then configure it with my calender type. at this time, when i go in User > My Setting > Regional Setting and choose Calender Type, Persian Calender does not exist in the list and i want to develop and add to calender types myself, but how to do ?
thanks
|
|
|
|
|
I have extracted controls such as text boxes, buttons, grids etc from the page and embedded them into a user control (ascx file) which is also placed on the same page! Now I'm presented with a dilemma...i'm not sure when the user clicks the button, lets say located on the page itself, I'm suppose to go inside the user controls (which is also on the same page) and make stuff happen with the controls inside this user control such as put the focus on a text box, or clear the text box's value and things like that. I have asked this question earlier, and someone told me that I can create public properties in the user control and call them from the page by using FindControl method. Well apparently this isn't working for me.
Can someone please tell me how do I use delegates to accomplish this (if possible). or if there's a better and easier way to do this kind of stuff. I'd appreciate it. Thanks
Tina
|
|
|
|
|
|
Hi friends,
I am making any saving on any web page. In code block, I am writing Response.Write(Apple.Quantity) after saving code. It turns me previous apple.quantity before recording , not current apple.quantity. How can I solve this problem?
Good Days
|
|
|
|
|
Hi,
Please paste your code and try to check if you are not initializing the value on page load.
|
|
|
|
|
Hey guys, as I mentioned in the subject line...I'm having trouble interacting between the page level controls and the User Controls (asxc files) that I have. I have devided the page into five sections
<table>
<tr> General drop downs and buttons are located here</tr>
<tr>
<td>
First User control
<td>
<td>
Second User control
</td>
</td></td></tr>
<tr>
<td>
3rd User control
</td>
<td>
4th User control
</td>
</tr>
</table>
Now ititially I wasn't using these user controls, so all the controls that are now present inside these user controls were directly located on the page. It was easier to pass into around and do things such clear the entire form and other things since all the controls were right there on the page. But now that I have extracted those controls such as text boxes, buttons, grids etc and embedded them into these user controls, I'm presented with a delliema...i'm not sure when the user clicks the button, lets say on the top level (the buttons that are located on the page itself), I'm suppose to go inside the user controls and make stuff happen such as put the focus on a text box, or clear the text box's value and things like that. I have asked this question earlier, and someone told me that I can create public properties in the user control and call them from the page by using FindControl method. Well apparently this isn;t working for me. Can someone tell me how do I use delegates to accomplish this if possible. or if there's a better and easier way to do this kind of stuff. I'd appreciate it
Tina
|
|
|
|
|
Hello!
The control is a object that is located in the page class.
that is,
you can access methods in the control by referencing them as:
Mycontrol.MyMethod() from the page.
to find buttons and/or other control in the ascx, use Mycontrol.FindControl("MyButton").
Andreas Johansson
IT Professional at Office IT Partner i Norrbotten Sweden
What we don't know. We learn. What you don't know. We teach
|
|
|
|
|
Hi Andreas, thanks for the response... I actually tried something similar to this earlier...but it won't find the control when I pass in the ID of, for instance the button FindControl("MyButton").
I was reading somewher that delagates could be used to pass information around in for instance a situation like this. Can someone shed some light on this please.
Tina
|
|
|
|
|
Hi,
Use the following control to get the control rather than FindContol
public static Control GetControlByID(string id, Control ctl)
{
Control retCotl;
for (int i = 0; i < ctl.Controls.Count; i++)
{
retCotl = ctl.Controls[i].FindControl(id);
if (retCotl != null)
{
return retCotl;
}
else
{
retCotl = GetControlByID(id, ctl.Controls[i]);
if (retCotl != null)
{
return retCotl;
}
}
}
return null;
}
Some how i feel Control.FindControl is buggy and doesnot always get the control. Use this one to avoid the problem
|
|
|
|
|
Hi,
If you just need to clear textboxes and put focus on then , you can use javascript to accomplish the task i dont know why you want to clear textbox in a server side event.
If you have to call server side code use reflection to invoke method and properties of the controls.
|
|
|
|
|
hi there, thanks a lot for your response...I'm going to give it a try tomorrow. Thanks
Tina
|
|
|
|
|
php or asp.net give me good reaseon i need to know which is best for web development
|
|
|
|
|
There's no easy answer to that - it depends on your individual needs. If you want continuity with the .NET framework, or you code well in a language such as C# and would rather do that than learn another language, then ASP.NET is the way to go. However, Windows-based servers (for ASP.NET) are usually more expensive than Linux ones (for PHP) so it depends whether you want to spend more money for an ASP.NET server or not.
This article might help.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
i think it depends on what kind of websites u r going to develop.
one reason to chose php, it's opensource u don't need to purchase license for it
|
|
|
|
|
Hi,
You may find this question quite absurd but I wonder how a project would be rebuild if a user performs some unexpected actions such as deleting the all files under bin and debug directory including dll files.
If I delete everything under bin directory and debug directory. How could I rebuild the whole project and lets say that I also deleted these files in recyclebin too. If I attempt to build or rebuild the project, I would get plenty of error messages and therefore none of essential files would be reproduced.
Rebuilding a project presumable be able to produce these essential files to create the structure of the project regardless of if there are errors or not in the project. Isn't that right?
Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
It totally depends on the project
Many times i have deleted all the files from bin folder to make sure all dll will get refreshed and it works for me.
If you are referring any dll to ypur project and that dll was in bin folder then you will get n number of errors
Check your references of the application. All refered dll should not be in bin folder create a different folder.
Is it that you wanted ?
Let me know if you have any concerns ?
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... "
Check My Blog
|
|
|
|
|
Thank you for your respond. Here is what I did so far so good.
I removed webconfig file from the project and then reproduced it. I saw that all the errors in all the web pages' gone. The errors was pointing the first line in every page.
However I faced to another problem. The class files in back-end that are associated to pages were still pointing the errors. The reason was because when you crate a new aspx page, VS also creating class files for the page in back-end. However when the root information for the inheritance for the pages get messed up, all this class files are also getting messed up too. I couldn't file any solution for that how to fix it. Basically I decided to create a new project and then transfered all the contents of the pages. Now it is working but the way shouldn't be the solution to how to fix such error.
Thanks again.
Regards.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|