Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
68% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
3 Commented Posts
~24.9K People Reached
Favorite Tags

74 Posted Topics

Member Avatar for dfs3000my
Member Avatar for shubhalaxmi

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

Member Avatar for Komal_2
-1
1K
Member Avatar for sonakrish

[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

Member Avatar for sachin.ghute3
0
305
Member Avatar for kodingkarthik
Member Avatar for sonakrish

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]

Member Avatar for walflo
0
2K
Member Avatar for Egypt Pharaoh

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 …

Member Avatar for megabuild7
0
242
Member Avatar for nmakkena

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) …

Member Avatar for tjaank
0
2K
Member Avatar for manoj_582033
Member Avatar for FTProtocol
Member Avatar for saad749
0
564
Member Avatar for miskeen

[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 …

Member Avatar for spectra
0
918
Member Avatar for carobee

Try using the SqlCommandBuilder Class like this [CODE] SqlCommandBuilder mySqlCommandBuilder = new SqlCommandBuilder(mySqlDataAdapter); mySqlDataAdapter.Update(myDataSet, "myTableName"); [/CODE]

Member Avatar for ggl0rd
0
223
Member Avatar for korssane

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.

Member Avatar for Sri_r
0
181
Member Avatar for emilio

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 …

Member Avatar for mail2saion
0
392
Member Avatar for divyasrinivasan

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]

Member Avatar for mail2saion
1
187
Member Avatar for Khushi2$

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"); }

Member Avatar for tybalt88
0
762
Member Avatar for bharatshivram

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 …

Member Avatar for P.K.Chaudhary
0
268
Member Avatar for Xessa

<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> …

Member Avatar for greeny_1984
0
145
Member Avatar for firebirds98

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]

Member Avatar for Aneesh_Argent
0
90
Member Avatar for arunmozhi

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 …

Member Avatar for serkan sendur
0
169
Member Avatar for emilio

[URL="http://www.leastprivilege.com/AddingErrorMessagesToAValidationSummary.aspx"]Here[/URL] is an article that explains exactly how to do that.

Member Avatar for emilio
0
127
Member Avatar for julseypart

Try this: [CODE] if ([B]FileUploadControl1.HasFile[/B]) { //upload a file } else { lblResult.Text = "Please select a file first"; } [/CODE]

Member Avatar for julseypart
0
131
Member Avatar for chakkilam
Member Avatar for chriscross86

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> …

Member Avatar for sonakrish
0
139
Member Avatar for Ramy Mahrous

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 …

Member Avatar for Ramy Mahrous
0
132
Member Avatar for dilake

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]

Member Avatar for Aneesh_Argent
0
102
Member Avatar for yorock
Member Avatar for freshfitz

Try this [icode]Label2.Text = (Label) this.FormView1.FindControl("passwordLabel").Text;[/icode]

Member Avatar for Salem
0
159
Member Avatar for sonakrish

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 …

Member Avatar for KushKashyap
0
72
Member Avatar for ricksvoid

Which DB are you using? On MS Sql Studio Management Express, Right Click on the node "Databases" and Select "Restore Database" option.

Member Avatar for Ole Raptor
0
95
Member Avatar for surekhavk

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]

Member Avatar for surekhavk
0
308
Member Avatar for ssreevidya.m

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.

Member Avatar for ssreevidya.m
0
101
Member Avatar for love_dude1984

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 …

Member Avatar for love_dude1984
0
117
Member Avatar for mona515

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 < …

Member Avatar for Ramy Mahrous
0
115
Member Avatar for its.romi

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 …

Member Avatar for its.romi
0
162
Member Avatar for ff4930

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 …

Member Avatar for greeny_1984
0
371
Member Avatar for sonakrish

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

Member Avatar for greeny_1984
0
123
Member Avatar for sonakrish

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]

Member Avatar for greeny_1984
0
89
Member Avatar for shobitha

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#

Member Avatar for shobitha
0
268
Member Avatar for bindu155

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]

Member Avatar for Aneesh_Argent
0
72
Member Avatar for FTProtocol

This site contains all about connection strings. Hope it will help you [URL="http://www.connectionstrings.com/"]http://www.connectionstrings.com/[/URL]

Member Avatar for Aneesh_Argent
1
121
Member Avatar for sankar62

[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 …

Member Avatar for Aneesh_Argent
0
65
Member Avatar for sonakrish
Re: C#

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

Member Avatar for sonakrish
0
115
Member Avatar for squirell

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 …

Member Avatar for squirell
0
94
Member Avatar for AnilReddy

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]

Member Avatar for AnilReddy
0
119
Member Avatar for sivak

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 …

Member Avatar for sivak
0
75
Member Avatar for piotr_kast

[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 …

Member Avatar for piotr_kast
0
106
Member Avatar for zarnimg

Are you sure you have enough HDD and RAM space available? Try building your solution after closing all other applications

Member Avatar for Aneesh_Argent
0
93
Member Avatar for stek74

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]

Member Avatar for sierrainfo
0
113
Member Avatar for luckyads

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

Member Avatar for luckyads
0
72
Member Avatar for csharplearner

Debugging is the best way to find exactly where and why runtime errors occurs in your solution

Member Avatar for csharplearner
0
109

The End.