Jump to content
Xtreme .Net Talk

Joe Mamma

Avatar/Signature
  • Posts

    1093
  • Joined

  • Last visited

1 Follower

About Joe Mamma

  • Birthday 08/06/1963

Personal Information

  • Occupation
    software integration consultant
  • Visual Studio .NET Version
    Visual Studio .NET 2003 Enterprise Architect
  • .NET Preferred Language
    C#,Delphi

Joe Mamma's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. diskspace is cheap compared to a hard to find bug. store them in char(13) - left pad with zeros. nothing worse that people storing SSN's in int fields.
  2. Do you need a client side activex control? or a server side COM control? I would like to see the exact assignment requirements. ActiveX usually implies user interface. This will be embeded and instance in the client browser via an <object> tag. you can't create a pure activex control with .Net. google "media player in web page" for an example of embedding activex.
  3. should have read: [font=Courier New][color=#0000ff]Dim[/color] Script [color=#0000ff]as[/color] [color=#0000ff]String[/color] = String.Format("var ctrl = document.getElementById(""{0}"");", Me.ThisControl.UniqueID)[/font][font=Verdana][/font]
  4. SQL Server Agent can schedule jobs for you
  5. when rendering the ID of a control, the rendered ID is simple Control.UniqueID. so to render a document.getElementById - Dim Script as String = String.Format("var ctrl = document.getElementById({0});", Me.ThisControl.UniqueID)
  6. First I would switch to the Jet 4.0 OleDb Provider but this should work for both: cmdAdd.CommandText = "INSERT INTO tblTest (" & _ "Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, Parm7, Parm8) VALUES (" & _ "?, ?, ?, ?, ?, ?, ?, ?)" cmdAdd.Parameters.AddWithValue("Parm1", lvItem.Text) cmdAdd.Parameters.AddWithValue("Parm2", lvItem.SubItems(1).Text) cmdAdd.Parameters.AddWithValue("Parm3", CDate(lvItem.SubItems(2).Text)) cmdAdd.Parameters.AddWithValue("Parm4", lvitem.SubItems(3).Text) cmdAdd.Parameters.AddWithValue("Parm5", lvitem.SubItems(4).Text) cmdAdd.Parameters.AddWithValue("Parm6", lvitem.SubItems(5).Text) cmdAdd.Parameters.AddWithValue("Parm7", lvitem.SubItems(6).Text) cmdAdd.Parameters.AddWithValue("Parm8", lvitem.SubItems(7).Text) cmdAdd.ExecuteNonQuery()
  7. With intellisense and code completion, parameters are trivial. And as PD mentioned . . . I know exactly how much time it costs to code with parameters. I have no idea what a bug will cost, time - money - customers. Nip it in the bud!
  8. webBrowser1.Navigate("about:blank"); mshtml.IHTMLDocument2 currentDoc = (mshtml.IHTMLDocument2)webBrowser1.Document.DomDocument; mshtml.IHTMLElement bodydisp = currentDoc.createElement("body"); mshtml.HTMLDocument doc = (mshtml.HTMLDocument)currentDoc; doc.appendChild((mshtml.IHTMLDOMNode)bodydisp); mshtml.HTMLBody bdy = (mshtml.HTMLBody)bodydisp; bdy.leftMargin = "0pt"; bdy.topMargin = "0pt"; bdy.innerHTML = "<img top=\"0\" left=\"0\" src=\"http://www.obj-tec.com/hotchick.gif\" />";
  9. ok . . . create a C# windows application - ManagingControls. add new class file. . . call it ManagedControl.cs. put this code in ManagedControl.cs: namespace ManagingControls { public class ManagedControl { string _name; System.Windows.Forms.Control _control; public ManagedControl(string name, System.Windows.Forms.Control control) { _name = name; _control = control; } public string Name { get { return _name; } } public System.Windows.Forms.Control Control { get { return _control; } } } public class ManagedControlList: List<ManagedControl>{} public interface IManagedControlContainer { ManagedControlList ManagedControls { get; } } } add a new form FormManager.cs. drop a listbox, 2 textboxes, and a button on it and put this code in FormManager.cs: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace ManagingControls { public partial class FormManager : Form { public FormManager() { InitializeComponent(); } public FormManager(IManagedControlContainer _container): this() { listBox1.DataSource = _container.ManagedControls; listBox1.DisplayMember = "Name"; listBox1.ValueMember = "Control"; textBox1.DataBindings.Add("Text", listBox1.SelectedValue, "Text"); textBox2.DataBindings.Add("Text", listBox1.SelectedValue, "Left"); this.button1.Click += button1_Click; } private void button1_Click(object sender, EventArgs e) { this.Close(); } } } drop a textbox and a button on form1.cs (the main form of the app) and put this code in form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace ManagingControls { public partial class Form1 : Form, IManagedControlContainer { public Form1() { InitializeComponent(); button1.Click += button1_Click; } private void button1_Click(object sender, EventArgs e) { FormManager frm = new FormManager(this); frm.ShowDialog(); } ManagedControlList IManagedControlContainer.ManagedControls { get { ManagedControlList list = new ManagedControlList(); list.Add(new ManagedControl(textBox1.Name, textBox1)); return list; } } } } run the app .. . press the button on Form1. . .type some text into textbox1. type some numbers into textbox2. watch what happens.
  10. short of changing the modifiers on txtBox to public or internal in the designer (not recommended in most cases) , do the following in Form1.cs: public partial class Form1 : Form { public Form1() { InitializeComponent(); } public Form1(string initialValue): this(){ this.txtBox.Text = initialValue; } public string TextBoxText { get { return this.txtBox.Text;} set { this.txtBox.Text = value;} } } usage: Form1 frm = new Form1("foobar"); frm.Show(); Form1 frm2 = new Form1(); frm2.TextBoxText = "foobar2"; frm2.Show();
  11. the replace function is deactivated by security configuration for applications outside of access. this can be overroiden via a registry setting, but this might not be suitable. for apps that call to the jet REPLACE I use a combination of instr and mid. its a pain I know, but its the only way to do it without changing the registry. for a list of the 'safe' jet functions look here and an outline of the configuration: http://support.microsoft.com/default.aspx/kb/294698
  12. heres a thread outlining passing elements to a modal dialog in html. this is what you want the result of your asp rendering to accomplish: http://www.xtremedotnettalk.com/showthread.php?t=93870
  13. how are you opening popup.aspx? via window.ShowModalDialog ? your user control should register a script block for opening the window. use the UniqueID property of the text box in the script to pass the rendered input element to the opened document as one of the arguments of the window.ShowModalDialog method. The opened document wrties to it via the window.dialogArguments property using javascript. make sense???
×
×
  • Create New...