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
A

Atilla Ozgur

@Atilla Ozgur
About
Posts
8
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Dilbert
    A Atilla Ozgur

    I think it is safe to say that he can code in any language after all his pointy haired boss would not be able to understand any of them. But my vote for c++

    The Lounge com question

  • Rags To Riches
    A Atilla Ozgur

    Start with Fowler's book refactoring. These are my bookmarks about Refactoring in my browser. Some of them about testing, since testing and refactoring goes hand in hand. I am a bit weak about testing and trying to improve. I am trying to improve my refactoring skills too.

    Refactoring-TDD

    Introduce Explaining Variable

    Category Refactoring

    iunknown.com UI Programming and Unit Tests

    Unit Test

    Pairwise Testing for Dummies

    DevelopSense: Pairwise Testing

    The test cases go marching two by two, hurrah, hurrah

    Pairwise Pruning

    BowGo! CMU robotics researchers develop a pogo stick that aims high

    Refactoring Tutorial

    Refactoring To Pattern

    Chain Constructors

    Education is no substitute for intel

    Article Writing csharp question c++ graphics design

  • Rags To Riches
    A Atilla Ozgur

    Lets say this. You will learn while you are coding and designing. Your mistakes will teach you. For example I am in a project now. Which uses web services from a third party. This third party publishes web services which have same interface but they have diffrent names. I have tried to implement this using interfaces in my code. It worked but it was ugly and hard to change. I changed my code to use one abstract class and factory pattern. Now it is very easy to extend my design to accommadate other web services from this third party. But first I have implemented one solution. Then I looked my solution and changed it. I have not arhictected last solution first. Of course you need some knowledge for this. Of course you never have complete answer. If you do not need to expand that application leave it as it is. It is working. But you have to maintain and extend it. Then As I have done, refactor it to simple solution. Refactoring needs unit and other tests to see that you have not broken something without meaning. Refactoring does not mean only readable simple code. Refactoring means changing your code structure without changing its capability to simple structure. Think of this. You can cross ocean with a ship or airplane. Airplane is refactored solution. It accomplishes same thing but it is faster simpler in some places. Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition. Frank Herbert

    Article Writing csharp question c++ graphics design

  • Rags To Riches
    A Atilla Ozgur

    I advise you to read Refactoring by Martin Fowler. Uml and other things may be good. But I believe in iterative development. If you need something first build it however naive it can be. Then add to it, refactor it. I never build my inheritance classes at outset. I first build something, when I start to copy paste. I look for common parts to use in inheritance. Refactoring books teaches you how to this. Of course this is my opinion. Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition. Frank Herbert

    Article Writing csharp question c++ graphics design

  • Retrieving Username
    A Atilla Ozgur

    In you case I think windows has Authenticated your user and it is using NT AUTHORITY\SYSTEM to run your code.You have to use impersonation so that when you use that code line you will get correct user. Second solution could be to implement IPrincipal and explicitly set user information. Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition. Frank Herbert

    C# csharp security wcf help question

  • Storing DateTime Format, C# MSSQL DateTime field
    A Atilla Ozgur

    I suggest use Globalization Classes in .Net using System.Globalization using System.Threading in page load string slang = Request.UserLanguages[0]; Thread.CurrentThread.CurrentCulture = new CultureInfo(slang); With this code according to user preferences you should be able to save datetime properly. If user is american it expect american style, if it is turkish then it expects turkish style. Request.UserLanguages[0] gives you a string in this format en-UK or en-US first two chars is about language second two chars is about culture. You can check user culture and call different function according to that also. Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition. Frank Herbert

    Database csharp database sql-server help question

  • Submit a WebForm
    A Atilla Ozgur

    There are different ways to accomplish this. One is here with querystrings. put this code to your submit button event handler. private void btnSubmit_Click(object sender, System.EventArgs e) { Response.Redirect("Webform2.aspx?Name=" + this.txtName.Text + "&LastName=" + this.txtLastName.Text); } Put this code to second page page_load private void Page_Load(object sender, System.EventArgs e) { this.txtBox1.Text = Request.QueryString["Name"]; this.txtBox2.Text = Request.QueryString["LastName"]; } This way you can get values. Querystring is shown in address bar of your browser therefore you should not use this way to send sensitive information. & is used to distinguish between variables. You can also reach QueryString variables using indexers. foreach( string s in Request.QueryString) { Response.Write(Request.QueryString[s]); Response.Write("///"); } OR for (int i =0;i < Request.QueryString.Count;i++) { Response.Write(Request.QueryString[i]); Response.Write("///"); } I remember reading in somewhere that browsers have some capacity for QueryString length. If you need to send a variable which contains & such as "Mark & Spencer", you have a problem. I have read Server.UrlEncode solves this problem. But below is my solution. private void btnSubmit_Click(object sender, System.EventArgs e) { string p1 = this.txtName.Text.Replace("&","%26"); string p2 = this.txtLastName.Text.Replace("&","%26"); string sln = "WebForm2.aspx?" + "Name=" + p1 + "&LastName=" + p2; Response.Redirect(sln); } Same solution is in Microsoft .Net Quick Start tutorials. ASP.NET--- Working with Web Controls --- Performing Page Navigation (Scenario 1) Performing Page Navigation (Scenario 2) See them also if you want to see more example for this technique. Second solution would be usage of SessionState. Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition.
    Frank Herbert Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition. Frank Herbert

    ASP.NET csharp asp-net help

  • Set focus on usercontrol datagrid textbox
    A Atilla Ozgur

    First solution which comes to my mind is via javascript. Create a hidden variable in your page. You can do so with plain html in aspx page or with the help of ASP.NET javascript help functions. this.Page.RegisterHiddenField("myFocusField","myhiddenfield"); this code results in a html below. Now change your code as this. this.Page.RegisterHiddenField("myFocusField",FindName()); private string FindName() FindName function will return unique name of your edit controls. You can take it with this.UniqueID; code piece in your edit control. After that write a startupscript in your aspx page. var vFocText = document.myFocusField.value; var vFoc = document.getElementById("vFocText"); vFoc.focus() Education is no substitute for intelligence. That elusive quality is defined only in part by puzzle-solving ability. It is in the creation of new puzzles reflecting what your senses report that you round out the definition. Frank Herbert

    ASP.NET 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