Jump to content

Bhushan

Members
  • Posts

    48
  • Joined

  • Last visited

About Bhushan

  • Birthday 05/05/1982

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    INDIA
  • Interests
    I am interested in Web Technologies.

Bhushan's Achievements

Newbie

Newbie (1/7)

0

Reputation

  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.
×
×
  • Create New...