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
D

dkosasih

@dkosasih
About
Posts
6
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • dynamic control in separate class
    D dkosasih

    Hi All, I have been stuck with this problem for a long time and have not found any solution. suppose I have a page called a.aspx.vb and a class file called B.vb. in a.aspx.vb I create a new instance of B:

    protected sub page_load()
    dim cls as new B
    dim lit as new literal
    lit = b.createbutton
    end sub

    then say inside the B.vb I have:

    protected function createbutton() as literal
    dim lit as new literal
    dim butt as new Button()
    'this is where my problem is
    addhandler butt.click, addressof method
    lit.controls.add(butt)
    return lit
    end function

    I want my code to do something on click. like...assign some value to some variables on a.aspx. say again in the a.aspx I want something like:

    sub method
    'on button click
    dim something as string
    something = "the button has been clicked"
    end sub

    But obviously it won't work just like that. so how do I do that??? I hope this explains what I need. Thanks for helping in advance.

    ASP.NET help question

  • linq to BindingNavigator/BindingSource
    D dkosasih

    Hi all, Here I am with my question again :) i am wondering how do I bind linq query to BindingNavigator or at least a BindingSource so I can bind it to BindingNavigator. say, I have go a BindingNavigator called bn (BindingNavigator bn) var query = from t in db.SOMETHINGS select t; I tried bn.BindingSource = query; and it was no help at all I also tried BindingSource bs = new BindingSource(); bs.DataSource = query; bn.BindingSource = bs that also return me errors. Basically I just wanted to achieve something like this with linq. Because I have started it with linq :( String strConn = "Data Source=DATASOURCE;Initial Catalog=DB;User ID=sa;Password=sa;"; SqlConnection conn = new SqlConnection(strConn); SqlDataAdapter da = new SqlDataAdapter("Select * From [TRANSACTION]", conn); SqlCommandBuilder cmd = new SqlCommandBuilder(da); DataSet ds = new DataSet(); da.Fill(ds, "trans"); BindingSource bs = new BindingSource(ds, "trans"); //I can't simply use linq query result here :(:(:( bnPrevTrans.BindingSource = bs; Again, thank you guys ....

    LINQ database question csharp linq help

  • Linq in Function
    D dkosasih

    I got one more question that I think I have missed out. in this code: var query = from b in db.CATEGORies select b; foreach (var cat in query) { ... } in the code "var cat", what is the data type of that var if i need to pass that value to other function? again, thank you very much.

    LINQ database question csharp linq

  • Linq in Function
    D dkosasih

    indeed... thank you

    LINQ database question csharp linq

  • Linq in Function
    D dkosasih

    Hi all, I just started to learn about linq and have some question. say normally we would query something like this bt01DataContext db = new bt01DataContext("Data Source=SOURCE;Initial Catalog=XXX;User ID=XX;Password=XX;"); var query = from b in db.CATEGORies select b; foreach (var cat in query) { ... } now, I want split it into one separate class so that i will have the query all together in 1 file say Query.cs. public DATA TYPE** GetAllCategories() { try { var query = from b in db.CATEGORies select b; return query; } catch (Exception ex) { throw ex; } } in my code I want to call something like this Query q = new Query; var sampleQuery = q.GetAllCategories(); question: Do I have to use something else to replace the var? and what return DATA TYPE** should I use in order to get the result I want? i read from somewhere that i could use bt01(I have bt01.dbml) as data type but I couldn't get it to work when I try that.. any information would be greatly appreciated... thx guys

    LINQ database question csharp linq

  • drawing line
    D dkosasih

    dear fellow programmers, i have been trying to achieve this but it's so hard. i am trying to say make an image and when i mouse down the image and drag it, i want to draw a line from the initial of the image to where my mouse is. and when i release it, the line will disappear. is there anyway I can achieve this? thanks all...

    Visual Basic graphics question announcement
  • Login

  • Don't have an account? Register

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