Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

gyokusei

@gyokusei
About
Posts
36
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to create a watermark in Crystal Report?
    G gyokusei

    Hi all! I want to create a watermark in Crystal Report like in MS Word but I don't know how. Can you show me how? Thx!

    ASP.NET tutorial question

  • Redirect to Word document???
    G gyokusei

    if( File.Exists(Server.MapPath("...")) )
    {
    FileStream MyFileStream;
    long FileSize;
    MyFileStream = new FileStream(Server.MapPath("..."), FileMode.Open);
    FileSize = MyFileStream.Length;
    byte[] Buffer = new byte[(int)FileSize];
    MyFileStream.Read(Buffer, 0, (int)FileSize);
    MyFileStream.Close();
    Response.ContentType = "application/msword";
    Response.BinaryWrite(Buffer);
    }
    else
    MessageBox.Show("File not found!");

    This code fragment will ask user download this file. However user can open this file by press open button. Therefore, MSWord will be open. Is there any suggestion?

    ASP.NET help question

  • Stored Procedures
    G gyokusei

    dadax_85 wrote:

    proc = "EXEC SP1 " & TextBox1.Text & ",'" & TextBox2.Text & "','" & TextBox3.Text & "'," & TextBox4.Text

    very dangerous! using these code instead: [C#]

    SqlCommand cmd = new SqlCommand("SP1", con);
    cmd.CommandType = CommandType.StoredProcedure;

    cmd.Parameters.Add("@ID", TextBox1.Text);
    cmd.Parameters.Add("@Name", TextBox2.Text);
    cmd.Parameters.Add("@Decription", TextBox3.Text);
    cmd.Parameters.Add("@ProjectID", TextBox4.Text);

    cmd.ExecuteNonQuery();

    -- modified at 21:55 Sunday 23rd April, 2006

    ASP.NET csharp asp-net database help tutorial

  • error in asp.net
    G gyokusei

    Using "try catch" block:

    try {
    // do something
    }
    catch( Exception ex ) {
    // do something if an error in try block occurs
    }

    ASP.NET csharp asp-net help

  • Extending Try Catch
    G gyokusei

    The flow of try catch block is when your code in try block occurs an error, it will do something in catch block. After that it will do something after catch block. So that:

    SqlConnection connection = new SqlConnection( "ConnectionString" );
    SqlCommand cmd = new SqlCommand( "CommandText", connection );
    try {
    connection.Open();
    cmd.ExecuteNoneQuery();
    }
    catch {
    // do something
    }

    now you put each line in try block in try catch block like that:

    try {

    try {
        connection.Open();
    } catch {
        // do something
    }
    
    try {
         cmd.ExecuteNoneQuery();
    } catch {
        // do something
    }
    

    }
    catch {
    // do something
    }

    Do you understand now?

    ASP.NET help career

  • to print datagrid control in asp.net 2k3
    G gyokusei

    Hi raj1984, try this: 1. Add a div tag on your page and give it an ID (ex: divGrid) 2. Add your datagrid control into the div. 3. Add an button and write to onclick event, which will open a new blank page. 4. Add all HTML tag in divGrid to the new page. ex: <div id='divGrid'> <asp:DataGrid.... </div> <input type='button' onclick.='doPrint();'> doPrint method: function doPrint() { var subwin = window.open("_blank"); // you can open an existing page var d = document.getElementById("divGrid"); subwin.document.write(d.innerHTML); subwin.print(); }

    ASP.NET csharp javascript asp-net com

  • Asp.net 2 - show webform as pop up form?
    G gyokusei

    Rahman Mahmoodi wrote:

    window.open('mywindow','','formname.aspx',height='400',width='400')

    window.open('formname.aspx','subwin','height=400,width=400,menubar=no,toolbars=no ,scrollbars=no');

    ASP.NET csharp asp-net algorithms question

  • Asp.net 2 - show webform as pop up form?
    G gyokusei

    Rahman Mahmoodi wrote:

    asp:Button ID="Button1" runat="server" Text="Button" "OnClick"="ShowWindow"

    <asp:Button ID="Button1" Runat="server" Text="Button"></asp:Button> on Page_Load: Button1.Attributes["onclick"] = "ShowWindow(); return false;"; That way is used for server control. However, you just add an HTML control is OK.

    ASP.NET csharp asp-net algorithms question

  • Button in datagrid footer
    G gyokusei

    try this event handler: OnItemCommand that button must be a server control

    ASP.NET help question

  • Wana Change Color of different Links on the same page
    G gyokusei

    try this: var i=0; var arr = new Array(); arr[0] = "blue"; arr[0] = "red"; arr[0] = "yellow"; arr[0] = "#000000"; function doClick(link) { link.style.color = arr[i]; i = i%20; // 20 is the link number } on page: <a href="..." onclick="doClick(this);">link 1</a> <a href="..." onclick="doClick(this);">link 2</a> <a href="..." onclick="doClick(this);">link 3</a> <a href="..." onclick="doClick(this);">link 4</a> .... Im not sure but something like this. :doh:

    ASP.NET csharp asp-net help

  • Sending email problem!!!
    G gyokusei

    When I send Email using: SmtpMail.SmtpServer = "..."; // My IP address SmtpMail.Send("webmaster@....", "gyokusei@inbox.com", "This is a test!", "Testing...... Thanks!"); It works fine but the mail message (.EML file) isn't delivered. It stores in Queue folder. I configured the IIS well as MSDN showed. And I can use Outlook 2003 to send an email to webmail(inbox.com) with my IP address. Can you help me solve this problem? -- modified at 0:13 Friday 14th April, 2006

    ASP.NET help com windows-admin data-structures testing

  • How to add an image to web user control?
    G gyokusei

    Thank you for your reply! However, GetWebResourceUrl: This method is new in the .NET Framework version 2.0. Now I tell you the detail: I want to write a datetimepicker, it has a textbox and an image at beside. So that I create a web control extended textbox. I don't care about the image of the assembly, I just pay attention to the image beside the textbox. I want when I compile it into dll file, It will be a dependent control. The image beside the textbox doesn't belong to any projects. any suggestion?

    ASP.NET tutorial question

  • use view state
    G gyokusei

    vipinpaliwal1980 wrote:

    1. i am want to know what is viewstate in asp.net.

    ViewState is an object use for save the state of server controls in webpage.

    vipinpaliwal1980 wrote:

    2. how can i use viewstate

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuicontrolclassviewstatetopic.asp

    vipinpaliwal1980 wrote:

    3. how much data take in viewstate

    I don't know exactly

    ASP.NET question csharp asp-net

  • How to add an image to web user control?
    G gyokusei

    Hi all, I created a control extends textbox control and I named it MyTextBox. In render method, I added an image beside the textbox like: <img src='...'>. However, when I apply it to my webpage. The image doesn't appear (The image's url depend on webapplication project). So, I want to ask you how I embed that image in my control (dll file). Thx!

    ASP.NET tutorial question

  • How to add multiple attachments dynamically using javascript?
    G gyokusei

    Hi all, I want to add multiple attachments dynamically by using javascript. And this is my code:

    <div id="attachments">

    </div>

    function addMore:

    function addMore(id)
    {
    // create the next id
    var newid = eval(++id);

    // create a new fileupload control
    string s = "";
    
    // add the control above to the form
    document.getElementByID('attachments').innerHTML += s;
    

    }

    It works fine, but the problem is the value of "file_1" is empty after the function addMore called. So that I can't use method: Request.Files (which gets all fileupload controls' values on the form) on server. Any suggestions? Thanks! -- modified at 6:10 Wednesday 5th April, 2006

    ASP.NET javascript sysadmin help tutorial question

  • How to validate input?
    G gyokusei

    1. set MaxLength property of that textbox to 6 2. drag a RegularExpressionValidator to .aspx page 3. set ControlToValidate property to the id of that textbox. 4. enter an expression to ValidationExpression property like this: (\d){6}

    ASP.NET question tutorial

  • Make a table
    G gyokusei

    DataTable tb = new DataTable("TableName"); for( int i=0; i<10; i++ ) { tb.Columns.Add( new DataColumn("ColumnName") ); // ColumnName is also the ID of this column, case-sensitive } for( int j=0; j<10; j++ ) { tb.Rows.Add( tb.NewRow() ); } how to access to the cell: tb.Rows[rowIndex][columnName]

    ASP.NET question

  • Question about DataGrid -> Header
    G gyokusei

    xoxoxoxoxoxox wrote:

    i have to ingore first two lines in my file and make third line header

    It means you have a xml file, and you read it to DataTable and after that you want to bind the data in DataTable to the Grid but set the third row to the header of the Grid, isn't it?

    ASP.NET question help

  • How to add a meta tag dinamically?
    G gyokusei

    Hi everyone! Can you show me how to add a meta tag dinamically?

    ASP.NET tutorial question

  • Is there file chooser in Javascript?
    G gyokusei

    Vasudevan Deepak Kumar wrote:

    Browse button in Inbox.com is for serverside file viewing. It also has a local file browser.

    Sorry for disturbing you, but I don't understand what you mean. I mean I want to use a hyperlink to open a file chooser (for more attachment like Gmail). However, as Gmail, I can't view the source of ComposeMail page in InboxMail. You said that it also had a local file browser. Can you show me more detail? Thank you very much!

    ASP.NET javascript help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups