- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
74 Posted Topics
Re: Try this Response.Write(htmlString ); | |
Re: 01. Project Management system project4hire.com 02. Online Auctioning system like eBay.com 03. Matrimonial systems like m4marry.com 04. Social networking site like orkut.com If u dont like any of the above please mention your priorities | |
Re: [code=sql]"INSERT INTO desg VALUES(" + txtsno.Text + ", " + txtdesg.Text +", " + txtbasic.Text + ");";[/code] You dont need to worry about Trim and Val functions here. Trim will happen automatically and Val is irrelevant here | |
Re: Try this : DdlId.SelectedItem.Text; | |
Re: MessageBox is only available in Window Applicaitons. In ASP.NET, you cannot use the MessageBox class or MsgBox function like you can in a Window Applicaitons, but you can emulate this functionality by streaming out a javascript alert instruction like this: [CODE] Response.Write(@"<script language='javascript'>alert('This is my Message')</script>"); [/CODE] | |
Re: From Decimal to Binary.. [ICODE] using System; class Program{ static void Main(string[] args){ try{ int i = (int)Convert.ToInt64(args[0]); Console.WriteLine("\n{0} converted to Binary is {1}\n",i,ToBinary(i)); }catch(Exception e){ Console.WriteLine("\n{0}\n",e.Message); } }//end Main public static string ToBinary(Int64 Decimal) { // Declare a few variables we're going to need Int64 BinaryHolder; char[] BinaryArray; string … | |
Re: Unfortunately you cannot set a filter for the file browser dialog, but you could add a JavaScript function that would validate the extension of the selected file when a new file is selected. Thus you can prompt the user when he makes an invalid selection. JS function [CODE] function checkFileExtension(elem) … | |
Re: Hope this will be helpful [url]http://support.microsoft.com/kb/329014[/url] | |
Re: [QUOTE=miskeen;775951]Hi, Is there any possible way to unselect a number of radiobuttons grouped in the same groupname? Thank you[/QUOTE] Try this javascript function to uncheck all radiobuttons with the same groupname. [CODE] function unSelectAllCheckBoxes() { var rdoBtns_Array = document.getElementsByTagName('input'); if(rdoBtns_Array.length>0) { for(i=0; i<rdoBtns_Array.length; i++) { //Check for radio button with … | |
Re: Try using the SqlCommandBuilder Class like this [CODE] SqlCommandBuilder mySqlCommandBuilder = new SqlCommandBuilder(mySqlDataAdapter); mySqlDataAdapter.Update(myDataSet, "myTableName"); [/CODE] | |
Re: All things you said are possible and are reasonably simple. But I would suggest you to use javascript ( or any other client side scripting language) for these tasks for better performance. | |
Re: The problem is the by default, the HtmlEncode property of the boundfield attribute is set to True. This helps prevent cross-site scripting attacks and malicious content from being displayed. Microsoft recommends that the HtmlEncode attribute be enabled whenever possible. The problem is that if this field is enabled, you can … | |
Re: Hope this will be helpful for your first question [URL="http://msdn.microsoft.com/en-us/library/ms972940.aspx"]http://msdn.microsoft.com/en-us/library/ms972940.aspx[/URL] Hope this will be helpful for your second question [URL="http://devpinoy.org/blogs/keithrull/archive/2008/07/28/how-to-create-dynamic-input-rows-in-a-gridview-with-asp-net.aspx"]http://devpinoy.org/blogs/keithrull/archive/2008/07/28/how-to-create-dynamic-input-rows-in-a-gridview-with-asp-net.aspx[/URL] | |
Re: On page load do this [CODE] //Creating Dynamic Image Button ImageButton objImageButton = new ImageButton(); objImageButton.ID="dynImageButton"; objImageButton.ImageUrl="Your Image URL"; //Add Click event handler objImageButton.Click += new System.Web.UI.ImageClickEventHandler(dynImageButton_Click); form1.Controls.Add(objImageButton);[/CODE] Your click function should be like this protected void dynImageButton_Click(object sender, EventArgs e) { Response.Write("Inside Image Button Click"); } | |
Re: Try this: [code] protected void Button1_Click(object sender, EventArgs e) { if(FileUpload1.HasFile) { string fileName = FileUpload1.FileName; string fileExtention = fileName.Substring(fileName.LastIndexOf("."), (fileName.Length - fileName.LastIndexOf("."))); string newFileName = User.Identity.Name + fileExtention; string imagefolder=Server.MapPath("~/Images/"); string targetFileName = imagefolder + newFileName; FileUpload1.SaveAs(targetFileName); Label1.Text = "File Uploaded Successfully"; Response.Redirect("userprofile.aspx"); } else { Label1.Text = "Please … | |
Re: <table style="text-align:center"> This is to align the content/data inside the table One way to achieve your requirement is to put your table inside a div and align the div to center. Here is a sample <div style ="width:100%; height: 100%; text-align: center"> <table > <thead> <tr> <td>Name</td> <td>Roll NO</td> <td>Class</td> … | |
Re: Rather than using Response.Write to inject javascript from code behind, you can use the ClientScript.RegisterStartupScript function to achieve this. This may solve your issue. Here is a sample code [CODE] string jsScript = @"<script language='javascript'>alert('This is my JS Statement');</script>"; ClientScript.RegisterStartupScript(GetType(),"_script",jsScript ); [/CODE] | |
Re: Before binding your DataTable(DataSource) to the grid, check the row count of the DataTable. If its empty (row count = 0) then add a dummy row to the DataTable and then bind it with the grid. Also make the visibility of the dummy row in the grid to false. Here … | |
Re: [URL="http://www.leastprivilege.com/AddingErrorMessagesToAValidationSummary.aspx"]Here[/URL] is an article that explains exactly how to do that. | |
Re: Try this: [CODE] if ([B]FileUploadControl1.HasFile[/B]) { //upload a file } else { lblResult.Text = "Please select a file first"; } [/CODE] | |
Re: To solve your compilation error issue rewrite line 21 like this: MonitorChanges(ctrl) | |
Re: As your error message suggests, you cannot have multiple items selected on a Dropdownlist. You can set only one ListItem's Selected property to true, which will be the default selected Item of your Dropdownlist. Your Dropdownlist should be something similar like this: [CODE] <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem Selected="True">Anually</asp:ListItem> <asp:ListItem>Monthly</asp:ListItem> <asp:ListItem>Weekly</asp:ListItem> … | |
Re: I dont think there is a built in method to get selected ItemsCollection only. Even if there is one, the algorithm would be the same as yours. So it wont solve the performance issue. One way to do this will be to use a javascript function to append the indices … | |
Re: Check this code snippet [CODE] int rowIndex; for(rowIndex = 0; rowIndex < myGrdView.Rows.Count; rowIndex++) { LinkButton ObjlnkBtn = new LinkButton(); ObjlnkBtn.Text = "Click"; //Let myGrdView.Rows[i].Cells[0].Text contains the item ID ObjlnkBtn.PostBackUrl = "EditPage.aspx?ID=" + myGrdView.Rows[i].Cells[0].Text; //Add Link button to the fifth column of each row in the GridView myGrdView.Rows[i].Cells[5].Controls.Add(ObjlnkBtn); } [/CODE] | |
| |
Re: Try this [icode]Label2.Text = (Label) this.FormView1.FindControl("passwordLabel").Text;[/icode] | |
Re: There is no built in method to refresh a control alone in a webpage. Either you have to refresh the whole page in every 10 Sec or U can use AJAX to refresh your control. You can have your interval update pinging a web service for updates on the control … | |
Re: Which DB are you using? On MS Sql Studio Management Express, Right Click on the node "Databases" and Select "Restore Database" option. | |
Re: Try this [code]//Store an array in to a ViewState ArrayList arrayVariable = new ArrayList(); ViewState["myArray"] = arrayVariable; //Retrive array from ViewState arryVariable = (ArrayList) ViewState["myArray"][/code] | |
Re: Could you please post your Image button source code in .aspx file. There might be a javascript function which contains a window.close(); statement that is being called on 'OnClientClick' of the Image button. Remove this statement or the whole function call if you dont want it. | |
Re: Try this too: 1) Make sure that IIS is configured to use Integrated Windows Authentication. Look for the checkbox on the Authentication Method dialog launched from the Directory Security tab of the site properties. 2) Make sure that HTTP Keep Alives are enabled. You'll find that checkbox on the Web … | |
Re: Try this: [CODE] //Rejecting negative amounts in deposits public void deposit(double amount) { if(amount < 0) { Console.WriteLine("Sorry, You cannot deposit negative amounts to your account"); return; } double newBalance = balance + amount; balance = newBalance; } ////Rejecting negative amounts in withdrawls. public void withdraw(double amount) { if(amount < … | |
Re: Captcha Image(image with moving or tilted characters) Verification is a method of preventing automated bots (or Scripts) from gaining aaccess to web page features, tyically submission forms. An image is presented for the user, with a number of characters. As part of the form completion the user enters the characters … | |
Re: Hi there Web form pages are HTTP-Based, they are stateless, which means they don’t know whether the requests are all from the same client, and pages are destroyed and recreated with each round trip to the server, therefore information will be lost, therefore state management becomes an important issue for … | |
Re: The best method to do this is in your DateBase Table. Add a primary key ID field of type integer with identity specification set to true. It will increment your ID field on each row insert | |
Re: This link will help you doing it [URL="http://dotnetslackers.com/Community/blogs/kaushalparik/archive/2008/07/16/checkbox-in-headertemplate-to-select-all-checkboxes-inside-a-gridview-using-javascript.aspx"]http://dotnetslackers.com/Community/blogs/kaushalparik/archive/2008/07/16/checkbox-in-headertemplate-to-select-all-checkboxes-inside-a-gridview-using-javascript.aspx[/URL] | |
Re: In C#, for selecting a single cell content from a dataset use: ds.Tables[tableIndex].Rows[rowIndex][columnIndex].ToString(); So ds.Tables(0).Rows(0).item(0) in vb becomes ds.Tables[0].Rows[0][0].ToString(); in C# | |
Re: Try this link, hope it will be helpful [URL="http://www.codeproject.com/KB/IP/EmailByjebarson.aspx"]http://www.codeproject.com/KB/IP/EmailByjebarson.aspx[/URL] | |
Re: This site contains all about connection strings. Hope it will help you [URL="http://www.connectionstrings.com/"]http://www.connectionstrings.com/[/URL] | |
Re: [CODE]//First store your file in to a byte array like this HttpPostedFile filPosted = filUpload.PostedFile; int intFileLength = System.Convert.ToInt32(filPosted.ContentLength); byte[] byteData = new byte[intFileLength]; filPosted.InputStream.Read(byteData, 0, intFileLength); //Now use this byte array to insert your file into the Database SqlConnection myconn = new SqlConnection("Connection String here"); string insertQry = "INSERT … | |
Re: Select the control in design view and from the right click menu select Properties. Now on the properties window click on the events icon on its the top. All valid event will be listed there. Double Click on the desired event to add it to in your code | |
Re: Is this what you are looking for [code] Function getTheData() As DataTable Dim DS As New DataSet() Dim strConnect As New SQLConnection ("Server=credentials") Dim nutType As String Dim selectCmd As String 'Reads the query string value into the string nutType = Request.QueryString("nuttype").ToString(); selectCmd = "SELECT * FROM tblnuts WHERE nuttype … | |
Re: Is this wht u r looking for? [URL="http://www.4guysfromrolla.com/webtech/070601-1.shtml"]http://www.4guysfromrolla.com/webtech/070601-1.shtml[/URL] | |
Re: You can do this using a while loop by counting the row index in a counter variable as you advance along each row [CODE]rowCnt = -1;//Row Counter string name= null; while(myDataReader.Read())//Advance to the next row { rowCnt++; if(rowCnt == 10)// Check row index { name = myDataReader[8].ToString(); break;// read the … | |
Re: [CODE] HighSchool.Teacher staff = new HighSchool.Teacher("Vice Principal");[/CODE] Here u are creating an object of the class named Teacher which is derived from the class Person. So when u create the object 'staff', first the the base class(Person) constructor is called to initialize the data members inherited from the base class(You … | |
Re: Are you sure you have enough HDD and RAM space available? Try building your solution after closing all other applications | |
Re: Try this and pls let me know your feedback [URL="http://www.developer.com/db/article.php/10920_3595766_2"]http://www.developer.com/db/article.php/10920_3595766_2[/URL] | |
Re: No you cant access your page controls in any other class file other than your code behind file. Can U explain what u r trying to achieve. May b there is some work around | |
Re: Debugging is the best way to find exactly where and why runtime errors occurs in your solution |
The End.