Jump to content

Bhushan

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by Bhushan

  1. HI All,This is just to add my previous post that, this can be accomplished by going to File -> Page Setup and clearing things under Headers and Footers. But this might create problem in printing some other documents for which page headers and footers might be required.Hence, the code should clear the Web browsers, page setup Header and Footer options values and then once it prints, it should place back those values.Let me know if someone know how could we do this?.Cheers,Bhushan.
  2. HI All,I am creating a HTML file and passing this data to the printer to print and I am happy with the correctness of the data . But, the printed page contains the HTML file path and also gets printed in the footer.Example : If I have my HTML file at D:\Temp\File.html and when I execute my print functionality through some application, it passes this HTML data and prints on the paper. But the file path also comes under footer and it looks odd.How can I remove this line from appearing in my footer?...Do I have to handle this at printer level or Is it possible to handle this at programming level. Any HTML property available to handle this?Please let me know as soon as possible.Thanks in advance,Bhushan.
  3. Bhushan

    Decompiler

    Hi,I have an exe built in C programming language. I have lost it's source code. Anyone have any software to extract source code from my .exe ???Please reply at the earliest.Thanks.Bhushan.
  4. Hi,I have created 2 instances in my sql server database. My default instance is listening to port 5008. How could I determine the port numbers of my newly created instances ??.Is there any command or any wizard to check out??.....Please assist me.Cheers,Bhushan.
  5. Hi,Can you please help with the above post ?????
  6. Hi,I am making use of below code to check and uncheck my check boxes in the datagrid. But I am facing a problem here. When I click on the checkbox in the datagrid header, it checks all the datagrid box ( as expected) but the corresponding value fetched by it is repeating.Ex: I was expecting Pname,Pcode,Ptime,Pyear but it's fetching Pname,Pcode,Ptime,Pyear,Pname,Pcode.Anything wrong with the below code??........function SelectAll(CheckBoxControl) {if (CheckBoxControl.checked == true) {var i;for (i=0; i < document.forms[0].elements.length; i++) {if ((document.forms[0].elements.type == 'checkbox') && (document.forms[0].elements.name.indexOf('reportGrid') > -1)) {document.forms[0].elements.checked = true;}}} else {var i;for (i=0; i < document.forms[0].elements.length; i++) {if ((document.forms[0].elements.type == 'checkbox') && (document.forms[0].elements.name.indexOf('reportGrid') > -1)) {document.forms[0].elements.checked = false;}}}}
  7. Hi,That's cool. I am happy with the result.Thanks.
  8. Hi,I cannot double click on the checkbox since it is the child control. it's placed on the datagrid. How can I make use of e ??Is there any other way to achieve this??.Thanks,Bhushan.
  9. Hi ,I have 2 columns in my datagrid. first one fetches column names and second one contains checkbox.I want to assign the text in first column to a variable depending on the checkbox ( when it is checked).Since checkbox doesn't contain commandName property, I cannot handle in OnItemCommand function.How can I achieve it??.Thanks,Bhushan.
  10. Hi ,The below code is successfully generating a new label and a checkbox dynamically.But it's not saving. I mean on every post back, it's lost. Again I made to click on the button to generate.How can I make sure that the generated controls are saved. Do u have any Idea??. Label myl=new Label(); CheckBox ck=new CheckBox(); ck.ID="chkfield"; myl.ID="labelfield"; myl.Text="New Label"; HtmlTable t=(HtmlTable)Page.FindControl("Table3"); HtmlTableRow r=new HtmlTableRow(); HtmlTableCell c1=new HtmlTableCell(); HtmlTableCell c2=new HtmlTableCell(); c1.Controls.Add(myl); c2.Controls.Add(ck); r.Cells.Add(c1); r.Cells.Add(c2); t.Rows.Add®;Please see below for one more problem im facing.Here in first function im adding controls dynamically. In the second function im trying to print the ID of the dynamically created control which is giving me "object reference not set to an instance" error.Please let me know how can I achieve this.private void Button5_Click(object sender, System.EventArgs e) { Label myl=new Label(); CheckBox ck=new CheckBox(); ck.ID="chkfield"; myl.ID="labelfield"; myl.Text="New Label"; HtmlTable t=(HtmlTable)Page.FindControl("Table3"); HtmlTableRow r=new HtmlTableRow(); HtmlTableCell c1=new HtmlTableCell(); HtmlTableCell c2=new HtmlTableCell(); c1.Controls.Add(myl); c2.Controls.Add(ck); r.Cells.Add(c1); r.Cells.Add(c2); t.Rows.Add®; } private void Button6_Click(object sender, System.EventArgs e) { CheckBox ch=(CheckBox)Page.FindControl("chkfield"); Response.Write(ch.ID.ToString()); }
  11. Hi, I want to add checkbox and labels dynamically into a HTML table in an aspx page. So that in future, if columns increase in database table, I can insert label checkbox pair dynamically in front end and then can query database. By doing this I could avoid getting into codebehind files.How can I achieve this?. Please giv me a valuable suggestion of urs so that it becomes easy to understand. Thanks in advance, Regards ,
  12. Bhushan

    asp.net help

    Hi,Instead of a DataReader, make use of DataSet object.You can have a function which will return a dataset.example: System.Data.DataSet function_name(){//your code herereturn //your dataset object.}
  13. Hi,How can I import different class in my existing page??. Do i have to give just the namespace or class name as well??. Do I have to prefix my methods with the imported class object??. Plese let me know.Please suggest me any article for this.
  14. Bhushan

    Finding a control

    Hi ,I am catching the ItemCommand event as below and trying to find a control.public void mCommandHandler(object sender,DataGridCommandEventArgs e) { if(e.CommandName=="edit_here") { TextBox t=(TextBox)Page.FindControl("txtName"); labl.Text=t.Text; } }It's throwing me the same error saying "Object reference is not set to an instance of an Object".Do you have any Idea ??.HTML code is as follows :<asp:datagrid id="DetailsGrid" style="Z-INDEX: 102; LEFT: 16px; POSITION: absolute; TOP: 160px" runat="server" HeaderStyle-ForeColor="blue" HeaderStyle-Font-Bold="True" OnItemCommand="mCommandHandler" AutoGenerateColumns="False" EditItemStyle-BackColor="#cccfff" BackColor="Transparent" BorderColor="Transparent" OnCancelCommand="cancel" OnEditCommand="edithere" ShowFooter="True"> <EditItemStyle BackColor="#CCCFFF"></EditItemStyle> <HeaderStyle Font-Bold="True" Wrap="False" ForeColor="White" BackColor="Navy"></HeaderStyle> <FooterStyle BackColor="White"></FooterStyle> <Columns> <asp:TemplateColumn HeaderText="Employee Details"> <ItemTemplate> <table> <tr> <td> Name </td> <td> <asp:TextBox ID="txtName" Runat="server" ReadOnly="True" Text="Hello man"></asp:TextBox> </td> </tr> <tr> <td> NT ID </td> <td> <asp:TextBox ID="Textbox1" Runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"SecureNTID")%>'> </asp:TextBox> </td> </tr> <tr> <td> Designation </td> <td> <asp:TextBox ID="Textbox2" Runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Designation")%>'> </asp:TextBox> </td> </tr> <tr> <td> Address </td> <td> <asp:TextBox ID="Textbox3" Runat="server" TextMode="MultiLine" Text='<%#DataBinder.Eval(Container.DataItem,"ResourceAddress")%>'> </asp:TextBox> </td> </tr> </table> </ItemTemplate> <FooterTemplate> <asp:Button ID="btnEdit" Runat="server" Text="EDIT" CommandName="edit_here" /> </FooterTemplate> </asp:TemplateColumn> </Columns> </asp:datagrid>
  15. Ohhh not again.....I am finding it confusing while fetching data using footer template button click.I founf that when i was using e.Item.Cells[0].Text it was picking value from the footer row. Since there was no data nothing was out put.Hoe can i get the value of datagrid items using e.Items ??? when i click a button which is residing in a footer.??thanks,Bhushan.
  16. Bhushan

    Footer doubt??

    Hi,I am clicking on a button inside my Footer Template and handling the click event. But it's not working. It's giving me nothing. No errors aslo.Please see this.I have 2 columns and 1 row in my datagrid.ex:Name IDBhushan 101So what I am expecting from my below code is to print Bhushan.if(e.CommandName=="btnedit"){ string str=e.Item.Cells[0].Text; lab.Text=str;}One more thing is if i replace the above code by the below oneif(e.CommandName=="btnedit"){ lab.Text="hello world";}Its working fine. I am really shocked by this.Please let me know.
  17. Bhushan

    Finding a control

    Hi,When I add (.) it gave me error saying TextBox defines a class where a variable is expected. In the first place, do I have to include anything else??.I have hierarchy like this.I am facing a problem in my project where in I have made use of a Data Grid and inside it I have used a HTML table and inside <td> I am using a asp TextBox.When I tried to find out this TextBox using string str=((TextBox)e.Item.Cells[0].FindControl("txtName")).Text;Response.Write(str);It is giving me an error saying “bject reference not set to an instance of an Object”Please suggest me how can I resolve this??. I am also mailing you the piece of code which might be useful for you to pin point my mistake !. I tried here something different. But even this didn't work out. ASPX code: I have the following textbox under <table> which is inside a DataGrid. <td><asp:TextBox ID="txtName" Runat="server" ReadOnly=True Text='<%#DataBinder.Eval(Container.DataItem,"ResourceName")%>'></asp:TextBox></td> <FooterTemplate><asp:Button ID="btnEdit" Runat="server" Text="EDIT" CommandName="edit_here" /></FooterTemplate> I have a ItemCommand=”mCommandHandler” as my DataGrid property. CodeBehind: public void mCommandHandler(object sender,DataGridCommandEventArgs e) { if(e.CommandName=="edit_here") { TextBox t=(TextBox)e.Item.FindControl("txtName"); string str=t.Text; Response.Write(str); } } Please help me in getting rid of this problem.Thanks in advance,Bhushan
  18. Hi,Anyone please tell me the duration for which a Session variable exists??.I am making use of a session variable which hold my login id info and when i keep my web page static for 10 minutes or so, the page tells server error.Is there any default time duration for a session variable page is kept idle??
  19. Bhushan

    Menu in asp.net

    Hi,How can I build a nice Menubar in asp.net??.I can do with HTML and Javascript combined which doesn't look much good and interactive.Please give me some advise and any freeware which I could make use of??
  20. Bhushan

    Finding a control

    Hi,I have a TextBox inside a HTML table which is inside a DataGrid.I used TextBox t=(TextBox)DetailsGrid.FindControl("txtName");Response.Write(t.Text);But its not working. Please let me know.
  21. HI,I could disable asp:Button, HTML button using JavaScript. But I want to use LinkButton and i am not able to disable the linkbutton using javascript.Why this happens with linkbutton??.Please let me know how can i get this done???...ThanksBhushan.
  22. Bhushan

    How to Deploy??

    Hi,I am done with one small Web Application in asp.net.I know that Windows application can be deployed. Is it possible to deploy Web Applications??. I don't want to keep my .cs files exposed in my root directory.How can i do that??.
  23. Bhushan

    ASP Form

    Hi,To be more precise, I have an aspx page containing one link button and for its onClick event I am invoking another aspx page through javascript. The popping aspx page is not having any JS code in it.Please advise how can I make sure that this popping aspx page doesn't minimize.Thnx,Bhushan.
  24. Bhushan

    ASP Form

    Hi All,I am invoking an aspx page from current aspx page using javascript's window.open() menthod. But when the page loads, it doesn't stay there, it automatically minimizes. How can I avoid this to see the page standing when I click the button in my parent form.Thnx,Bhushan.
  25. Hi,If I were to have only 1 field for description i wouldn't have used HTML table. Since I have 3 fields , I am using html table so that i could format them accordingly. I think we cannot place EditableItemTemplate inside <td> ?? (donn know)..It's not giving any error Justin. It's just replacing everything ( every <td> value ) by textbox when I place like below.<asp:TemplateColumn HeaderText="GIMS Details"><ItemTemplate><table border="1" width="450"><tr><td width="18%">Description </td><td><%# DataBinder.Eval(Container.DataItem,"Description")%></td></tr></ItemTemplate><EditItemTemplate><asp:TextBox id="txt" runat="server" Mode="Multiline"/></EditItemTemplate></asp:TemplateColumn>I am not getting where exactly to place this EditItemColumn so that I can have this textbox available for editing in the right place and with other firleds visible.ThnxBhushan.
×
×
  • Create New...