Search Results

Search found 4334 results on 174 pages for 'sender'.

Page 69/174 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • Linq2SQL or EntityFramework and databinding

    - by rene marxis
    is there some way to do databinding with linq2SQL or EntityFramework using "typed links" to the bound property? Public Class Form1 Dim db As New MESDBEntities 'datacontext/ObjectContext Dim bs As New BindingSource Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load bs.DataSource = (From m In db.PROB_GROUP Select m) grid.DataSource = bs TextBox1.DataBindings.Add("Text", bs, "PGR_NAME") TextBox1.DataBindings.Add("Text", bs, db.PROB_GROUP) '**<--- Somthing like this** End Sub End Class I'd like to have type checking when compiling and the model changed.

    Read the article

  • No Change for Index of DropDownList in a Custom Control!!!

    - by mahdiahmadirad
    Hi Dears, I have Created A Custom Control which is a DropDownList with specified Items. I designed AutoPostback and SelectedCategoryId as Properties and SelectedIndexChanged as Event for My Custom Control. Here Is My ASCX file Behind Code: private int _selectedCategoryId; private bool _autoPostback = false; public event EventHandler SelectedIndexChanged; public void BindData() { //Some Code... } protected void Page_Load(object sender, EventArgs e) { BindData(); DropDownList1.AutoPostBack = this._autoPostback; } public int SelectedCategoryId { get { return int.Parse(this.DropDownList1.SelectedItem.Value); } set { this._selectedCategoryId = value; } } public string AutoPostback { get { return this.DropDownList1.AutoPostBack.ToString(); } set { this._autoPostback = Convert.ToBoolean(value); } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (SelectedIndexChanged != null) SelectedIndexChanged(this, EventArgs.Empty); } I Want Used Update Panel to Update Textbox Fields According to dorp down list selected index. this is my code in ASPX page: <asp:Panel ID="PanelCategory" runat="server"> <p> Select Product Category:&nbsp; <myCtrl:CategoryDDL ID="CategoryDDL1" AutoPostback="true" OnSelectedIndexChanged="CategoryIndexChanged" SelectedCategoryId="0" runat="server" /> </p> <hr /> </asp:Panel> <asp:UpdatePanel ID="UpdatePanelEdit" runat="server"> <ContentTemplate> <%--Some TextBoxes and Other Controls--%> </ContentTemplate> <Triggers> <asp:PostBackTrigger ControlID="CategoryDDL1" /> </Triggers> </asp:UpdatePanel> But Always The Selected Index of CategoryDDL1 is 0(Like default). this means Only Zero Value will pass to the event to update textboxes Data. what is the wrong with my code? why the selected Index not Changing? Help?

    Read the article

  • Delay in the implementation of text change in Statusbar control

    - by ehsan zeynali
    I have a function a time consuming operation that is done I want to start and end operations appear to be user (By statusbar control) But when performed function, both text executed at the end of function. (user can not sees "Start Operation ...") What solution do you recommend to me? private void btnUpdateDataBase_Click(object sender, RoutedEventArgs e) { TextBlockStatus.Text = "Start Operation ..."; //Time consuming operation TextBlockStatus.Text = "End Operation ..."; }

    Read the article

  • this.Width=30; NOT WORKING!

    - by j-t-s
    Hi All, I've been doing this for years. But now it's just not working. private void Form1_Deactivate(object sender, EventArgs e) { this.Size = new Size(30, 29); txt.Visible = false; lbl.Visible = false; } The form just does not change Width. But, as above, the 3 controls DO become invisible. Any suggestions?

    Read the article

  • Using MonoDroid, how can I open a dialog when an EditText field gains focus?

    - by Kiada
    I made the EditText clickable but you have to "double-click" to bring the dialog box up, which isn't really desired behaviour. How can I bring the dialog box up when the EditText is clicked / gains focus? Bonus points for including a way to stop the keyboard popping up :) _createProfileDobEdtTxt.Clickable = true; _createProfileDobEdtTxt.Click += (sender, e) => { ShowDialog(DATE_OF_BIRTH_DIALOG); };

    Read the article

  • Button redirect error

    - by Bader
    I am trying to a redirect the user when they click on a specific button protected void Button1_Click(object sender, EventArgs e) { Server.Transfer("ControlPanel/Default.aspx"); } The problem is when I click Button1 it redirects me to another page localhost:57988/WebSite5/Default.aspx and the weirdest thing is it open another page with this link above, not the default page I have, but another but with the default.aspx page url that you see! Any suggestions?

    Read the article

  • Problem getting size of Website Xcode

    - by Michael Amici
    When i try and compile I come up with a warning that reads initialization makes pointer from integer without a cast. No clue why. I am just trying to get the size of a website. #import "Lockerz_RedemptionViewController.h" @implementation Lockerz_RedemptionViewController -(IBAction)startLoop:(id) sender { NSData *dataNew = [NSData dataWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://www.google.com/"]]]; NSUInteger *len = [dataNew length]; //error is here NSLog(@"%@", len); }

    Read the article

  • I can't see any trace output in ASP.NET

    - by asksuperuser
    In Visual Studio 2010 I added Trace to Page_Load as explained here http://www.asp101.com/articles/robert/tracing/default.asp but I can't see any Trace output, why ? public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Trace.IsEnabled = true; Trace.Write("Hello World"); } }

    Read the article

  • Runtime error on Did End On Exit in iPhone application

    - by Deepak Pillai
    Does anyone know why im getting runtime error when i click on return button on iphone keyboard. I need to hide keyboard after done editing values to UITextField. So i assigned Did End On Exit to IBAction and the IBAction code below -(IBAction)FinishEditing:(id)sender { [folderName resignFirstResponder]; } When running ma project i facing a runtime error and the variable values shown below argv char ** 0xbffff58c *argv char * 0xbffff6b8 **argv char '/' Console Value (lldb) Any idea to overcome this issue??

    Read the article

  • Load view when button is clicked in Xcodes Storyboard

    - by dooonot
    I just started to use Storyboard in Xcode. I have a starting view that has some buttons inside. Is there a way to load a special view when a button is clicked? I only found this workaround: -(IBAction)loadRegistration:(id)sender { // load registration controller UIStoryboard *storyboard = self.storyboard; RegisterController *svc = [storyboard instantiateViewControllerWithIdentifier:@"RegisterController"]; [self presentViewController:svc animated:YES completion:nil]; }

    Read the article

  • How to display Request.QueryString Data.

    - by chamara
    Follwing code that i have tried doesn't display any thing. Test1.aspx protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("Test2.aspx?ID=1"); } Test2.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test2.aspx.cs" Inherits="WebApplication5.test2" % Untitled Page ' </div> </form>

    Read the article

  • Call IBAction in other method

    - by user1628083
    I have an IBAction of SignIn and Method getData. When load it call SignIn into method Getdata in case I want auto sign in without click button Sign In. -(void)getData {       if ([_remCheckbox state] == NSOnState)     {         NSUserDefaults *store = [NSUserDefaults standardUserDefaults];                  NSString *un = [store objectForKey:@"usrname"];         NSString *pw = [store objectForKey:@"usrpwd"];                  _txtUsername.stringValue = un;         _txtPwd.stringValue = pw;                  //call event IBAction              }   } - (IBAction)buttonSignIn:(id)sender {     //Signin code suppose to work fine }

    Read the article

  • C# work with functions

    - by gloris
    Hi, I'am new with C#. How works in C# functions? My try: private void Form1_Load(object sender, EventArgs e) { MessageBox.Show(Convert.ToString(number_p(5))); } public void number_p(int number) { int one = 1; number = number + one; return number; } Error: return, why? Thanks

    Read the article

  • Convert ToString to time format C#

    - by Michael Quiles
    Time.ToString("0.0") shows up as a decimal "1.5" for instead of 1:30 how can I get it to display in a time format. private void xTripSeventyMilesRadioButton_CheckedChanged(object sender, EventArgs e) { //calculation for the estimated time label Time = Miles / SeventyMph; this.xTripEstimateLabel.Visible = true; this.xTripEstimateLabel.Text = "Driving at this speed the estimated travel time in hours is: " + Time.ToString("0.0") + " hrs"; }

    Read the article

  • How to use value in Application Settings load?

    - by monkey_boys
    private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Properties.Settings.Default.Save(); } I used Application Settings and When Form was load i see value in control but i can't use its when Form load event. how to use value that bind from Application Settings when event Form1_Load ?

    Read the article

  • How do I link up a button click event between a class and a module automatically?

    - by CowKingDeluxe
    I have this code (which doesn't work): Public Class Form1 End Class Public Module test1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Form1.Button1.Click MsgBox("HI") End Sub End Module I know I could handle the button click event in Form1, and then call a function in test1, but I would like to handle the button click event directly in the test1 module. Is there a way to automatically send UI events from the Form1 class to another module?

    Read the article

  • issue of hide uipickerview in iphone

    - by M007
    I want to display UIPickerView with UIToolBar on the top of pickerView with done and cancel button.Attached is the screen shot for the same.I also have tab bar controller in bottom side of view and I want to display pickerView over bottom bar thats why I am using uipickerView inside of actionsheet.Now my issue is how to dismiss that pickerView on cancelButton click which is added in UIActionSheet? Following is the function to display pickerView : -(IBAction)setMile:(id)sender { menu = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; // Add the picker UIPickerView *pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0,55,0,0)]; pickerView.delegate = self; pickerView.showsSelectionIndicator = YES; // note this is default to NO UIToolbar *pickerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0,0,320,44)]; pickerToolbar.barStyle = UIBarStyleBlackOpaque; [pickerToolbar sizeToFit]; NSMutableArray *barItems = [[NSMutableArray alloc] init]; UIBarButtonItem *cancelBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(setMileCancel:)]; [barItems addObject:cancelBtn]; [cancelBtn release]; cancelBtn=nil; UIBarButtonItem *flexSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; [barItems addObject:flexSpace]; [flexSpace release]; flexSpace=nil; UIBarButtonItem *doneBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(setMileDone:)]; [barItems addObject:doneBtn]; [doneBtn release]; doneBtn=nil; [pickerToolbar setItems:barItems animated:YES]; [barItems release]; barItems=nil; [menu addSubview:pickerToolbar]; [menu addSubview:pickerView]; [menu showInView:self.view]; //[menu showFromTabBar:[[self tabBarController] tabBar]]; this code is not working [menu setBounds:CGRectMake(0,0,320, 545)]; [pickerView release]; [menu release]; pickerView=nil; menu=nil; } I have following code on cancel button click -(IBAction)setMileCancel:(id)sender { //[menu removeFromSuperview]; [menu dismissWithClickedButtonIndex:0 animated:YES]; }

    Read the article

  • Infinite loop when Select?!

    - by serhio
    I have a winform in witch I have a custom LongPanel with textboxes. In order to validate an eventually edited textbox when the user click somewhere out of textBoxY I use the following code: Private Sub LongPanel_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs) _ Handles MyBase.MouseClick _AttachedPanel.Select() End Sub In runtime application freezes at the "Select" line... I receive infinite panel Leave events... any idea why?

    Read the article

  • Confirm function in codebehind

    - by Geetha
    Hi All, I am using the following code to show confirmation dialog box after finishing some update process in database. but it is not working for me. code: protected void imbtnUpdate_Click(object sender, ImageClickEventArgs e) { // Database process string javaScript = "<script language=JavaScript>\n " + "if(confirm('Do you want to update the files?'))window.location.href = \"Upload.aspx?ID=" + ID + "&pt=Gm&page=Gms\"; else return false;\n" + "</script>"; RegisterStartupScript("imbtnUpdate_Click", javaScript); }

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >