Search Results

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

Page 65/174 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Scanned value(using scanner) in the textbox

    - by Geetha
    Hi All, I am using Scanner(basic model) to scan the barcode. Scanned barcode will be captured in a textbox. In txtBarcode_TextChanged event i am getting the barcode to access. Problem: If i clicked the scanner more than once, the barcode gets append with the previous value. Code: protected void txtBarcode_TextChanged(object sender, EventArgs e) { string txt = this.txtBarcode.Text; this.txtBarcode.Text = string.Empty; }

    Read the article

  • Set Masterpage from Global.asax in ASP.NET

    - by StefanE
    Hi, I want to set the Masterpage property in Global.asax. This is what I have done but I get a NullReferenceException on the first line. Any ideas how to do this? protected void Application_PreSendRequestContent(Object sender, EventArgs e) { System.Web.UI.Page page = System.Web.HttpContext.Current.Handler as System.Web.UI.Page; if (Session["lang"] == "eng") { page.MasterPageFile = "SideMasterPageEng.master"; } }

    Read the article

  • iphone: unrecognized selector sent to instance

    - by eshalev
    I am new to objective C, So maybe there is some basic thing that I am missing about selectors. I would like to understand the basic concept behind this error as I have not found an general error reference. I am getting this error when using: [CloseButton addTarget:PageContents action:@selector(CloseButtonPressed) forControlEvents:UIControlEventTouchUpInside]; and then later: - (void)CloseButtonPressed:(id)sender{ UIAlertView *someError = [[UIAlertView alloc] initWithTitle: @"Comment" message: @"hello" delegate: self cancelButtonTitle: @"Ok" otherButtonTitles: nil]; [someError show]; [someError release]; }

    Read the article

  • WPF windows locked when calling webservice. Even when run asynchronously

    - by SumGuy
    Hi there. I'm having a big problem when calling a web service from my WPF application. The application/window locks until the process has completed. I've attempted to run this asynchronously but the problem still persists. Currently, the web service call I'm making can last 45-60 seconds. It runs a process on the server to fetch a big chunk of data. As it take a little while I wanted to have a progress bar moving indeterminately for the user to see that the application hasn't stalled or anything (you know how impatatient they get). So: private void btnSelect_Click(object sender, RoutedEventArgs e) { wDrawingList = new WindowDrawingList(systemManager); AsyncMethodHandler caller = default(AsyncMethodHandler); caller = new AsyncMethodHandler(setupDrawingList); // open new thread with callback method caller.BeginInvoke((Guid)((Button)sender).Tag, MyAsyncCallback, null); } Click a button and the app will create the form that the async stuff will be posted to and set up the async stuff calling the async method. public bool setupDrawingList(Guid ID) { if (systemManager.set(ID)) { wDrawingList.Dispatcher.Invoke(DispatcherPriority.Background, new Action(() => { wDrawingList.ShowForm(); Hide(); })); return true; } return false; } This is the async method. The showForm method contains the calls to setup the new form including the monster web service call public void MyAsyncCallback(IAsyncResult ar) { // Because you passed your original delegate in the asyncState parameter of the Begin call, you can get it back here to complete the call. MethodDelegate dlgt = (MethodDelegate)ar.AsyncState; // Complete the call. bool output = dlgt.EndInvoke(ar); try { // Retrieve the delegate. AsyncResult result = (AsyncResult)ar; AsyncMethodHandler caller = (AsyncMethodHandler)result.AsyncDelegate; // Because this method is running from secondary thread it can never access ui objects because they are created // on the primary thread. // Call EndInvoke to retrieve the results. bool returnValue = caller.EndInvoke(ar); // Still on secondary thread, must update ui on primary thread UpdateUI(returnValue == true ? "Success" : "Failed"); } catch (Exception ex) { string exMessage = null; exMessage = "Error: " + ex.Message; UpdateUI(exMessage); } } public void UpdateUI(string outputValue) { // Get back to primary thread to update ui UpdateUIHandler uiHandler = new UpdateUIHandler(UpdateUIIndicators); string results = outputValue; // Run new thread off Dispatched (primary thread) this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, uiHandler, results); } public void UpdateUIIndicators(string outputValue) { // update user interface controls from primary UI thread sbi3.Content = "Processing Completed."; } Any help or theories are appreciated. I'm at a loss. Thanks in advance

    Read the article

  • Silverlight : How to pass data from the reqest to the respose using Webclient Asychronous mode ?

    - by user318332
    This is probably a basic question .. void method1() { String VIP = "test"; WebClient proxy = new WebClient(); proxy.OpenReadCompleted += new OpenReadCompletedEventHandler(proxy_OpenReadCompleted); String urlStr = "someurl/lookup?q=" + keyEntityName + "&fme=1&edo=1&edi=1"; } void proxy_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { } I need to access VIP in the proxy_OpenReadCompleted method. Pl. help

    Read the article

  • Alert on gridview edit based on permission

    - by Vicky
    I have a gridview with edit option at the start of the row. Also I maintain a seperate table called Permission where I maintain user permissions. I have three different types of permissions like Admin, Leads, Programmers. These all three will have access to the gridview. Except admin if anyone tries to edit the gridview on clicking the edit option, I need to give an alert like This row has important validation and make sure you make proper changes. When I edit, the action with happen on table called Application. The table has a column called Comments. Also the alert should happen only when they try to edit rows where the Comments column have these values in them. ManLog datas Funding Approved Exported Applications My try so far. public bool IsApplicationUser(string userName) { return CheckUser(userName); } public static bool CheckUser(string userName) { string CS = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString(); DataTable dt = new DataTable(); using (SqlConnection connection = new SqlConnection(CS)) { SqlCommand command = new SqlCommand(); command.Connection = connection; string strquery = "select * from Permissions where AppCode='Nest' and UserID = '" + userName + "'"; SqlCommand cmd = new SqlCommand(strquery, connection); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); } if (dt.Rows.Count >= 1) return true; else return true; } protected void Details_RowCommand(object sender, GridViewCommandEventArgs e) { string currentUser = HttpContext.Current.Request.LogonUserIdentity.Name; string str = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString(); string[] words = currentUser.Split('\\'); currentUser = words[1]; bool appuser = IsApplicationUser(currentUser); if (appuser) { DataSet ds = new DataSet(); using (SqlConnection connection = new SqlConnection(str)) { SqlCommand command = new SqlCommand(); command.Connection = connection; string strquery = "select Role_Cd from User_Role where AppCode='PM' and UserID = '" + currentUser + "'"; SqlCommand cmd = new SqlCommand(strquery, connection); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds); } if (e.CommandName.Equals("Edit") && ds.Tables[0].Rows[0]["Role_Cd"].ToString().Trim() != "ADMIN") { int index = Convert.ToInt32(e.CommandArgument); GridView gvCurrentGrid = (GridView)sender; GridViewRow row = gvCurrentGrid.Rows[index]; string strID = ((Label)row.FindControl("lblID")).Text; string strAppName = ((Label)row.FindControl("lblAppName")).Text; Response.Redirect("AddApplication.aspx?ID=" + strID + "&AppName=" + strAppName + "&Edit=True"); } } } Kindly let me know if I need to add something. Thanks for any suggestions.

    Read the article

  • c# eventhandling error

    - by bragin.www
    i have method private void getValues(object sender, EventArgs e) { int id = int.Parse(dgvTable.Rows[dgvTable.CurrentRow.Index].Cells[0].Value.ToString()); var values = from c in v.db.TotalDoc where c.TotalID == id select c.TotalAmount; dgvValues.DataSource = values; } and datagridview "dgvTable" error at this line dgvTable.CellClick += new EventHadler(getValues); error text is: No overload for 'getValues' matches delegate 'System.EventHandler' please help!

    Read the article

  • About read sms From Mobile device with .net applicatio?

    - by nikunj
    Hello Friends, Can anyone help me? How can I read SMS from mobile with my .net application? i have a Nokia 5310 mobile phone. Can you tell me from where i can download Nokia SDK or source code or Nokia API etc? I want to make a custom application which reads SMS and at the same time sends a response to the sender's mobile number.

    Read the article

  • Weird location while moving WinForms picbox

    - by acidzombie24
    I couldnt figure the problem out so after debugging i finally decide to write the below. Why is the location jumping around?! 147 86 to 294 212 then back every callback? pic.MouseMove += my_MouseMove; my_MouseMove(object sender, MouseEventArgs e) Console.WriteLine("{0} {1} {2} {3}", e.X, e.Y, e.Location.X, e.Location.Y); 147 86 147 86 294 212 294 212 147 86 147 86 294 212 294 212 147 86 147 86 294 212 294 212

    Read the article

  • TCP sequence number question

    - by Meta
    This is more of a theoretical question than an actual problem I have. If I understand correctly, the sequence number in the TCP header of a packet is the index of the first byte in the packet in the whole stream, correct? If that is the case, since the sequence number is an unsigned 32-bit integer, then what happens after more than FFFFFFFF = 4294967295 bytes are transferred? Will the sequence number wrap around, or will the sender send a SYN packet to restart at 0?

    Read the article

  • How to get Firefox to not continue to show "Transferring data from..." in browser status bar after a

    - by Edward Tanguay
    The following silverlight demo loads and displays a text file from a server. However, in Firefox (but not Explorer or Chrome) after you click the button and the text displays, the status bar continues to show "Transferring data from test.development..." which erroneously gives the user the belief that something is still loading. I've noticed that if you click on another Firefox tab and then back on the original one, the message goes away, so it seems to be just a Firefox bug that doesn't clear the status bar automatically. Is there a way to clear the status bar automatically in Firefox? or a way to explicitly tell it that the async loading is finished so it can clear the status bar itself? XAML: <UserControl x:Class="TestLoad1111.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <StackPanel Margin="10"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="0 0 0 10"> <Button Content="Load Text" Click="Button_LoadText_Click"/> </StackPanel> <TextBlock Text="{Binding Message}" /> </StackPanel> </UserControl> Code Behind: using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.ComponentModel; namespace TestLoad1111 { public partial class MainPage : UserControl, INotifyPropertyChanged { #region ViewModelProperty: Message private string _message; public string Message { get { return _message; } set { _message = value; OnPropertyChanged("Message"); } } #endregion public MainPage() { InitializeComponent(); DataContext = this; } private void Button_LoadText_Click(object sender, RoutedEventArgs e) { WebClient webClientTextLoader = new WebClient(); webClientTextLoader.DownloadStringAsync(new Uri("http://test.development:111/testdata/test.txt?" + Helpers.GetRandomizedSuffixToPreventCaching())); webClientTextLoader.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClientTextLoader_DownloadStringCompleted); } void webClientTextLoader_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { Message = e.Result; } #region INotifiedProperty Block public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } public static class Helpers { private static Random random = new Random(); public static int GetRandomizedSuffixToPreventCaching() { return random.Next(10000, 99999); } } }

    Read the article

  • Stretch panel with splitter

    - by user1153896
    I want to implement a basic WPF layout with three panels and two splitters (Horizontal and Vertical splitter). Two panels on the left and on the bottom has to be callapsable and one panel has to stretch accordingly. Here is a simple XAML: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="5"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <StackPanel Background="Aqua" Grid.Column="0" Name="leftPanel" > <TextBlock FontSize="35" Foreground="#58290A" TextWrapping="Wrap">Left Hand Side</TextBlock> </StackPanel> <GridSplitter Grid.Column="1" HorizontalAlignment="Stretch"/> <Grid Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="5" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Label Content="... Clien Area .. Has to Stretch vertically and horizontally" Margin="10"></Label> <Button Click="LeftButton_Click" Margin="10">Close Left Panel</Button> <Button Click="BottomButton_Click" Margin="10">Close Bottom Panel</Button> </StackPanel> <GridSplitter Grid.Row="1" Background="Gray" HorizontalAlignment="Stretch"/> <ListBox Grid.Row="2" Background="Violet" Name="bottomPanel"> <ListBoxItem>Hello</ListBoxItem> <ListBoxItem>World</ListBoxItem> </ListBox> </Grid> </Grid> and codebehind: private void LeftButton_Click(object sender, RoutedEventArgs e) { leftPanel.Visibility = (leftPanel.Visibility == System.Windows.Visibility.Visible)? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible; } private void BottomButton_Click(object sender, RoutedEventArgs e) { bottomPanel.Visibility = (bottomPanel.Visibility == System.Windows.Visibility.Visible) ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible; } This code doesn't work as expected :(. Any WPF experts around? to suggest a solution for having Client Area (stretched) and splitter at the same time? DockPanel will work perfectly, but I need splitter! Thanks.

    Read the article

  • UITextView disabling text selection

    - by dizy
    I'm having a hard time getting the UITextView to disable the selecting of the text. I've tried: canCancelContentTouches = YES; I've tried subclassing and overwriting: - (BOOL)canPerformAction:(SEL)action withSender:(id)sender (But that gets called only After the selection) - (BOOL)touchesShouldCancelInContentView:(UIView *)view; (I don't see that getting fired at all) - (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view; (I don't see that getting fired either) What am I missing ?

    Read the article

  • how to implement undo operation in datagridview

    - by ush
    Hi, I have created one application in c#.net.Using this application we can update datagridview,now i need to implement undo in it plz give me some ideas. private void button29_Click(object sender, EventArgs e) { Datatable dt; dt.RejectChanges(); } using above code i can do undo before updating. but i need a undo feature as in word plz suggest me thanks in advance

    Read the article

  • How to display Bitmap Image in image control on WPF using C#

    - by Sam
    I want that when I double click on a row in Listview, it should display the image corresponding to that row. This row also contains the path of the image. I tried the following but it displays the same image for all rows because I have given the path for a specific image: private void ListViewEmployeeDetails_MouseDoubleClick(object sender, MouseButtonEventArgs e) { ImageSource imageSource = new BitmapImage(new Uri(@"C:\northwindimages\king.bmp")); image1.Source = imageSource; } Please suggest

    Read the article

  • Setting the focus of listboxItem on pageload in Silverlight.

    - by Subhen
    Hi, I want to set focus on the first item of the listbox , on pageload. I can not use : listArtist.SelectedIndex= as I navigate to another page on selected indexChanged. I have the following code , but it is not working: void Event_Completed(object sender, RMSResponseEventArgs e) { listArtist.ItemsSource = e.eOutData; listArtist.Focus(); }

    Read the article

  • How do I write sql data into a textbox after a submit type event

    - by Matt
    Finishing up some homework and Im having trouble with figuring out how to take information generated in sql column(a primary key set up to assign a record number to a customer example 1046) at submit and writing it to my redirected recipt page. I call it recipt.aspx. Any takers Professor says to use a datareader...but things go bad after that. public partial class _Default : System.Web.UI.Page { String cnStr = "EDITED FOR THE PURPOSE OF NOT DISPLAYED SQL SERVERta Source=111.11.111.11; uid=xxxxxxx; password=xxxx; database=xxxxxx; "; String insertStr; SqlDataReader reader; SqlConnection myConnection = new SqlConnection(); protected void submitbutton_Click(object sender, EventArgs e) { myConnection.ConnectionString = cnStr; try { //more magic happens as myConnection opens myConnection.Open(); insertStr = "insert into connectAssignment values ('" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + bigtextthing.Text + "','" + DropDownList1.SelectedItem.Value + "')"; //magic happens as Connection string is assigned to connection object and passes in the SQL statment //associate the command to the the myConnection connection object SqlCommand cmd = new SqlCommand(insertStr, myConnection); cmd.ExecuteNonQuery(); Session["passmyvalue1"] = TextBox2.Text; Session["passmyvalue2"] = TextBox3.Text; Session["passmyvalue3"] = TextBox4.Text; Session["passmyvalue4"] = TextBox5.Text; Session["passmyvalue5"] = bigtextthing.Text; Session["I NEED SOME HELP RIGHT HERE"] =Textbox6.Text; Response.Redirect("receipt.aspx"); } catch { bigtextthing.Text = "Error submitting" + "Possible casues: Internet is down,server is down, check your settings!"; } finally { myConnection.Close(); TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; bigtextthing.Text = ""; } //reset validators? } The recipt page public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if(Session["passmyvalue1"] != null) { TextBox1.Text = (string)Session["passmyvalue1"]; TextBox2.Text = (string)Session["passmyvalue2"]; TextBox3.Text = (string)Session["passmyvalue3"]; TextBox4.Text = (string)Session["passmyvalue4"]; TextBox5.Text = (string)Session["passmyvalue5"]; TextBox6.Text = I don't know ; } } } THanks for the help

    Read the article

  • convert Arabic numerical to English

    - by hamitay
    i am looking for a way to convert the Arabic numerical string "??????????" to an English numerical string "0123456789" Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click dim Anum as string ="??????????" dim Enum as string =get_egnlishNum(Anum) End Sub private function get_egnlishNum(byval _Anum as string) as string '' converting code end function

    Read the article

  • Set Materpage from Global.asax in ASP.NET

    - by StefanE
    Hi, I want to set the Masterpage property in Global.asax. This is what I have done but I get a NullReferenceException on the first line.. Any ideas how to do this? protected void Application_PreSendRequestContent(Object sender, EventArgs e) { System.Web.UI.Page page = System.Web.HttpContext.Current.Handler as System.Web.UI.Page; if (Session["lang"] == "eng") { page.MasterPageFile = "SideMasterPageEng.master"; } }

    Read the article

  • Hiding a LinkButton in DataList

    - by sanfra1983
    Hi someone can tell me how to hide a LinkButton inside a DataList? I've tried to do this but I do not work: protected void Page_PreRender(object sender, EventArgs e) { foreach (var item in listanews) { DataList container = dlgestionenews; if (string.IsNullOrEmpty(item.IdNews)) { DataListItem itemdatalist = null; foreach (DataListItem itemdl in container.Items) { foreach (Control control in itemdatalist.Controls) { if (control.GetType().FullName == "LinkButton") { ((LinkButton)control).Visible = false; } } } } } } Thanks!

    Read the article

  • Delegates And Cross Thread Exception

    - by Neo
    Whenever i am updating UI in windows form using delegate it gives me cross thread exception why it is happening like this? is there new thread started for each delegate call ? void Port_DataReceived(object sender, SerialDataReceivedEventArgs e) { //this call delegate to display data clsConnect(statusMsg); } protected void displayResponse(string resp) { //here cross thread exception occur if directly set to lblMsgResp.Text="Test"; if (lblMsgResp.InvokeRequired) { lblMsgResp.Invoke(new MethodInvoker(delegate { lblMsgResp.Text = resp; })); } }

    Read the article

  • submitting data via email to websystem

    - by tnriverfish
    I'm working on a task system and I'd like to be able to submit a task to the system by emailing it to a particular address. I'm thinking I could set my user by the sender, the task subject by the subject and the task comments by the text of the email. Not sure the version of Exchange we have available if that matters but I'm running .net 3.5 and using C#. Any direction would be appreciated. Thanks, Charlie

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >