codebehind

How to react in ASP.NET code-behind class when a hyperlink is clicked inside the page's IFrame?

Hi Guys, I have an ASP.Net page containing an IFrame. In the IFrame I load a html document. When the user clicks on a hyperlink in the content of the IFrame, I would need a callback to be called in the code-behind class of the ASP.Net page. I guess that I need Ajax to do this but I'm not exactly sure about what I need to do. Could you ...

Using Multibinding.StringFormat in codebehind

I have this application that has dynamic language switching built in. Based on the selected Culture, strings throughout the application will change. Translated strings and their original values come out of resource files. I use bindings to attach the resource values to buttons, labels, etc. Most of this binding occurs in the code beh...

how does asp.net code behind work ?

i am new to ASP.NET development, and i am a little bit curious on the asp.net code behind mechanism. i know why we use it but what i would like to know is: the relation between aspx page and the code behind who does the linking between these two separate files ? how does it work? how an element created in aspx page can be accessed direc...

Dynamically Show/Hide Wizard Navigation Controls

Hi, I have a <asp:Wizard> control with 6 or so steps. In the first 3 steps, I want to hide the default Wizard navigation (Next button, etc.), as each WizardStep's contents will handle that. For the last 3 or so steps, if possible, I want to use the built-in navigation. I've modified the <StepNavigationTemplate> contents, but that alone...

Setting Font of TextBox from code behind

This maybe a stupid question but how do I set the font of a TextBox from a string in the code behind? // example txtEditor.FontFamily = "Consolas"; ...

infopath 2007- how to set cannot be blank from code behind

Hi, I have two drop down list box, on certain value of first drop down list box, i want to set the other drop down list property to cannot be blank, any idea, need some urgent solution, got stuck :( ...

Execute ASP.NET Membership Login from codebehind in button click handler

I'm trying to seamlessly log in the user without prompting for credentials as part of a <asp:Wizard> process. My strategy is to handle the NextButtonClick event and login the user in code. I already have the user's credentials saved in session variables. Is it possible to login a user in code? Will a hidden <asp:Login> control behind th...

Getting Text property in codebehind from ASP.NET TextBox with TextMode = Password

I have a <asp:TextBox with TextMode="Password". How can I read the value that the user entered, using the codebehind? I want to create a new user with code like this, but PasswordTextBox.Text is always an empty string. Membership.CreateUser(Username, PasswordTextBox.Text) ...

error when adding a control to a user control

I'm trying to add a control in within a user control: LinkButton l = new LinkButton(); l.Text = "Test"; l.OnClientClick = "TestClick"; l.ID = "TestID"; l.Page = Page; Page.Controls.Add(l); I get this error when the page loads: An unhandled exception was generated during the execution...