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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
P

priyamsc

@priyamsc
About
Posts
26
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to get the count value for gridview from (sqlserver database)database [modified]
    P priyamsc

    could you say little bit clearly

    k.priya

    ASP.NET database help html sysadmin docker

  • how to get the count value for gridview from (sqlserver database)database [modified]
    P priyamsc

    Hi, I am doing forum project. I have a doubt, tat how to count the value. that is, all the data which displays in gridview. in tat i need to show the reply value [count the value from database].it means in database i hv field lke pid,pstreplyid,uid,tit,sub ...., in tat wen i create new msg it ll save in database giving pid automaticaly and in pstreplyid if its newmsg it creates 0 if its reply ten it takes pid value. in gridview what i wud lke to display is, the reply value, if the pid(2) has 3 reply means, the field of reply shud show 3. but i hv given query which displays only the new msg tat is pstreplyid=0. i need to display new msg at the same time it should display the replyvalue also. but i dnt knw how to count tat value so pls help me to do. you just give me the suggestion to overcome the issue. this is the gridview coding ============================

    page load()
    {
    string k = "select *,(select uname from login where login.uid=thread.uid)as uname from thread where pstreplyid=0";
    adp = new SqlDataAdapter(k, con);
    DataSet ds = new DataSet();
    adp.Fill(ds);
    GridView1.DataSource = ds;
    GridView1.DataBind();
    }

    HTML ====

    <asp:TemplateField HeaderText="Thread">
    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("tit") %>'></asp:TextBox>
    </EditItemTemplate>
    <ItemTemplate>
    <
    <asp:LinkButton ID="LinkButton1" runat="server" Text='<% # Eval("tit") %>' CommandName ="viewmsg" CommandArgument ='<%# DataBinder.Eval(Container.DataItem,"pid")%>' >LinkButton</asp:LinkButton>
    <br />
    <%#Eval("sub") %>
    </ItemTemplate>
    <asp:BoundField HeaderText="Replies" DataField="pstreplyid"/>
    <asp:BoundField DataField="pdate" HeaderText="Post Date" />
    <asp:BoundField DataField="rdate" HeaderText="Reply Date" />
    <asp:TemplateField HeaderText="Posted By">

    Thank you in advance.

    k.priya

    modified on Sunday, August 9, 2009 12:08 PM

    ASP.NET database help html sysadmin docker

  • How to get 2 datas in single column in gridview
    P priyamsc

    Thank you for u both. i got answers.

    k.priya

    ASP.NET csharp help asp-net database sysadmin

  • How to get 2 datas in single column in gridview
    P priyamsc

    I am using asp.net 2005 with c#. i hv gridview and try to show the datas as forum.I have link button and in link button caption should be database value.i got the value but the problem is id. i need name instead of the id , based on tat id, need to show the name from another table. <asp:TemplateField > <ItemTemplate> <asp:LinkButton runat ="server" ID="lnk_pby" Text ='<% #Eval("uid") %>'></asp:LinkButton> </ItemTemplate> </asp:TemplateField> so what i should do for this. 2) my second doubt is how to show 2 datas in single field. tat is in this itemtemplate it shows only one datas but i need to show to idems how to show <ItemTemplate> <asp:LinkButton runat ="server" ID="lnk_pby" Text ='<% #Eval("uid") %>'></asp:LinkButton> pls help me,if u knw Thank you in advance

    k.priya

    ASP.NET csharp help asp-net database sysadmin

  • when i edit the gridview the database value dint bind on dropdownlist and check box
    P priyamsc

    hi, I m working in asp.net 2005 with c# language. in that i hv used gridview . i hv 3 dropdownlist and 4 checkbox and textbox in edit mode.when i edit gridview the text box value shows proper database value where as dropdownlist doesnt bind the database value. in the same way checkbox value is stored as 1 or 0 in database. if the value is 1 ten the checkbox of gridview shud be checked.this is also not firing.. so pls help me to do these things thanking you,

    k.priya

    ASP.NET csharp asp-net database help

  • problem in updating the gridview in asp.net 2005 with c# language
    P priyamsc

    hi, i have used gridview in asp.net 2005 wit c#.i need to update my datas.in tat i hv placed dropdownlist,checkbox controls.but its not updating the datas.when i edit the row,we have dropdownlist but not tat database value.so when i edit the row the database value should be in dropdown list.when i click update link i got this error.The GridView 'GridView1' fired event RowUpdating which wasn't handled.so pls help me to do this. this is coding ----------------- protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e) { GridViewRow gv = null; string k = string.Format(GridView1.Rows[gv.RowIndex].Cells[4].Text); Response.Write(k); TextBox t1, t2, t3, t4, t5,t6,t7,t8,t9,t10,t11; DropDownList d1, d2, d3, d4,d5; CheckBox cdr, cdrw, cdvdr, cdvdrw, cfdd, cinter, cwa; t1 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[5].Controls[1]; t2 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[6].Controls[1]; t3 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[7].Controls[1]; t4 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[8].Controls[1]; t5 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[9].Controls[1]; t6 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[10].Controls[1]; t7 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[11].Controls[1]; t8 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[18].Controls[1]; t9 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[20].Controls[1]; t10 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[21].Controls[1]; t11 = (TextBox)GridView1.Rows[gv.RowIndex].Cells[22].Controls[1]; d1 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[0].Controls[0]; d2 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[1].Controls[0]; d3 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[2].Controls[0]; d4 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[3].Controls[0]; d5 = (DropDownList)GridView1.Rows[gv.RowIndex].Cells[23].Controls[0]; cdr = (CheckBox)GridView1.Rows[gv.RowIndex].Cells[12].Controls[2]; cdrw = (CheckBox)GridView1.Rows[gv.RowIndex].Cells[13].Controls[2]; cdvdr =(CheckBox)GridView1.Rows[gv.RowIndex].Cells[14].Controls[2]; cdvdrw=(CheckBox)GridView1.Rows[gv.RowIndex].Cells[15].Controls[2]; cfdd = (

    ASP.NET help csharp asp-net database announcement

  • previous data should not be append in my dropdownlist in asp.net 2005 with c#
    P priyamsc

    hi, first i had the problem. tat is whenever i select the data it is added the previous value. so i have given [dd2.items.clear()]now its working but the problem is if it has only one value i cant select..so this is my problem... I have used 4 dropdownlist in tat if i select first dropdownlist then the based on the selectedvalue data will be bound in second dropdownlist but if it has only one value then i could not bound in next dropdownlist.i have written all the codings in dropdownlist_selectedindexchanged()... --------Select-------------- c# coding --------- dd3.Items.Clear(); string b = "select distinct a.descriptions,b.depid from Helpdesk_swift a,Helpdesk_pc_link b where a.swiftid='dep' and b.blockid=" + dd1.SelectedValue + " and b.locationid=" + dd2.SelectedValue + " and a.sid=b.depid"; SqlDataAdapter adp1 = new SqlDataAdapter(b, con); DataSet ds = new DataSet(); adp1.Fill(ds); dd3.DataSource = ds; dd3.DataTextField = "descriptions"; dd3.DataValueField = "depid"; dd3.DataBind(); so any one help me to do this....pls very urgent

    k.priya

    IT & Infrastructure csharp help asp-net

  • how to insert textbox and dropdownlist in crystalreport in asp.net2005 with c#
    P priyamsc

    what are u saying? i cant get u...

    k.priya

    ASP.NET csharp asp-net help tutorial question

  • how to insert textbox and dropdownlist in crystalreport in asp.net2005 with c#
    P priyamsc

    hi, i have used asp.net 2005 with c# language.i need a help. tat i would like to insert text box and dropdownlistbox. textbox for from date and todate.dropdownlist for department values..i have written storedprocedure...so automaticaly in the runtime it takes the parameter textbox... even if i put textbox and dropdownlist as my wish it wont consider the textboxvalue and dropdownvalue as a parameter... so any one help me to do this...it should not take text box for date and department fields automaticaly.. instead of that how can i place textbox and dropdownlist for parameter... so based on that only the datas should be shown..... so pls help me....

    k.priya

    ASP.NET csharp asp-net help tutorial question

  • how to close the application in Asp.net [modified]
    P priyamsc

    i m using Asp.Net 2005 and i wud like to close my application when i clieck button . i gave Response.close()......and end() but its not coming .. when i give response.end() then this error is coming [XML Parsing Error: no element found Location: http://localhost:2366/hlpdsk/just1.aspx Line Number 1, Column 1:] Thank you,

    k.priya

    modified on Saturday, March 22, 2008 3:54 AM

    IT & Infrastructure csharp asp-net xml json help

  • dropdown list bound problem in asp.net 2005 when i clike the dropdown which has only one value
    P priyamsc

    Hi, I have 3 dropdownlist in my web form. in first dropdown has the values from database when page gets loaded. and next when i click the first dropdown list then the second one should be filled based on that first dropdownlist. and for 3rd dropdown also same as first.... The problem is if the second dropdownlist has only one value then let me try to fill in the 3rd dropdownlist... it wont fill becaue i have given the coding in dd2_selectedindexchanged()event.. so its not coming.. i need the values even if the dropdownlist has one value. pls help me this is the coding ================== protected void dd1_SelectedIndexChanged(object sender, EventArgs e) { string a = "select distinct a.descriptions,a.sid from swift a,pc_link b where swiftid='loc'and a.sid=b.locationid and blockid="+dd1.SelectedValue; adp = new SqlDataAdapter(a, con); ds = new DataSet(); adp.Fill(ds, "swift"); dd2.DataSource = ds.Tables["swift"].DefaultView; dd2.DataTextField = "descriptions"; dd2.DataValueField = "sid"; dd2.DataBind(); } thank you,

    k.priya

    IT & Infrastructure help csharp swift asp-net database

  • Dropdown list problem
    P priyamsc

    Hi, I have dropdownlist in my web form.i put the datas getting from database and bound in dropdownlist...then when i click the dropdown list then only the some values will be stored in next dropdownlist.. I have problem when the first dropdown list has only one value then when i try to clik then the next dropdown list is not bound... (dropdownlist1.selectedvalue) so can u help me what should i do ....when i have only one value in dropdownlist1 and when i clik this the second dropdownlist2 should be filled.. so pls help me. thank you,

    k.priya

    IT & Infrastructure help database

  • how to display in iframe when i clik link button in asp.net 2005
    P priyamsc

    Hi, I have used table and iframe in a webform.that is top , left and right . in the left i have links and right i have the iframe...when i click the left link button the page should display in iframe page so help me how to give the target name,.... pls.... Thank you,

    k.priya

    IT & Infrastructure csharp asp-net help tutorial

  • how to create frames and frameset in asp.net 2005 [modified]
    P priyamsc

    i need to do it in asp.net 2005 so pls tel me is there option or not?

    k.priya

    IT & Infrastructure csharp html asp-net tutorial question

  • i want to know the flow of coding in asp.net 2005 with c#.so which key have to use?
    P priyamsc

    Thank you.. got the answer.

    k.priya

    IT & Infrastructure csharp asp-net question

  • i need date like this format (mm/dd/yyyy 10:03:44 AM) in Asp.net with c#
    P priyamsc

    Got the answer..Thanks to all ...

    k.priya

    IT & Infrastructure csharp asp-net help tutorial

  • how to create frames and frameset in asp.net 2005 [modified]
    P priyamsc

    I would like to create frameset as we have in html.... is there any frame form in Asp.net 2005 ? if it is then tel me how to include that form and where is it. Thank you,

    k.priya

    modified on Monday, March 17, 2008 11:41 AM

    IT & Infrastructure csharp html asp-net tutorial question

  • i need date like this format (mm/dd/yyyy 10:03:44 AM) in Asp.net with c#
    P priyamsc

    i got the answer just gave "MM/dd/yyyy hh:mm:ss"... but just give the explanation of this.... when i give mm/dd/yyyy it shows 22/17/2008 what is the difference between mm and MM ... and 03/17/2008 01:24:48 A3/P3 what is A3 when i give AM/PM..why its not coming properly...

    k.priya

    IT & Infrastructure csharp asp-net help tutorial

  • i need date like this format (mm/dd/yyyy 10:03:44 AM) in Asp.net with c#
    P priyamsc

    Thank you for ur reply. i have given like this Response.Write(DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss AM/PM")); the result is===>03/17/2008 01:24:48 A3/P3 and it gave A3/P3.but i need AM or PM but i need to store either AM or PM so ple help me.. and when i give mm/dd/yyyy it shows 22/17/2008 what is the difference between mm and MM sir... thank you

    k.priya

    IT & Infrastructure csharp asp-net help tutorial

  • i need date like this format (mm/dd/yyyy 10:03:44 AM) in Asp.net with c#
    P priyamsc

    In my asp.net with c# application i inserted date time with the help of this (datetime.now.tostring()) in this application it gives" dd/mm/yyyy 12:03:44AM" but in sqlserver it takes "mm/dd/yy 12:03:34 Am" format.so i do know how to give that format in Asp.net application.if any one knows then help me.. Thank you,

    k.priya

    IT & Infrastructure csharp asp-net help tutorial
  • Login

  • Don't have an account? Register

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