- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 7
- Posts with Upvotes
- 7
- Upvoting Members
- 6
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
Hi i am saion from Bangladesh. 5+ years experience in web application arena. I love to code in asp.net & sql server. Always try to learn & share.
- Interests
- Travelling
- PC Specs
- Intel Core 2 Duo
188 Posted Topics
Re: First visit few related sites then gather experience. Now point out options that you think you are capable to do it. Now cretate a rough proposal & discuss with your lecturer. After finalizing your requirement get back to us. Hope you will get a lot of expert people here. | |
Re: Yes you can follow the steps that iamchamith said. After getting individaul email then you can validate those from the following URL: [url]http://shawpnendu.blogspot.com/2009/04/cross-browser-javascript-aspnetc-email.html[/url] This will just check the input format. If you are looking to test that email id really exist or not then you can try with VRFY(most mail … | |
Re: HI TRY WITH MY BELOW SAMPLE CODE: [CODE] CREATE PROCEDURE PROCNAME @CountryId integer , @CountryName VARCHAR(200) , @nType integer AS BEGIN IF @nType=1 INSERT INTO Country VALUES(@CountryId,@CountryName); ELSE IF @nType=2 UPDATE Country SET CountryName=@CountryName WHERE CountryId=@CountryId; ELSE IF @nType=0 DELET FROM Country WHERE CountryId=@CountryId END [/CODE] NOW RUN BY BELOW … | |
Re: Yes i guess the problem is in where clause of your update code. Check that query string returned customer id exist in your database. | |
Re: FIRST RUN THE COMPLETE SQL THEN CHECK THE OUTPUT. THEN GO FOR MODIFICATION. [CODE] Create Table ##helpfile (dbname varchar(100), name varchar(100), FileId int, Filename varchar(100), Filegroup varchar(50), Size varchar(20), maxsize varchar(20), growth varchar(20), usage varchar(20)) Create Table ##filestats (Fileid int, FileGroup int, TotalSpace int, UsedSpace int, FreeSpace int, Name varchar(100), … | |
Re: JUST ADD THE EmptyDataText PROPERTY IN THE FOLLOWING WAY: [code] <asp:GridView runat="server" ID="gvCaseDetail" Width="100%" EmptyDataText="there is no data for this request" ...................................... [/code] YOU CAN ALSO RENDER HTMEL TEXT LIKE: [code] <asp:GridView runat="server" ID="gvCaseDetail" Width="100%" EmptyDataText="<table cellspacing=1 cellpadding=4 rules=rows border=0 style=color:Black;font-family:Tahoma;font-size:1em;width:730px;border-collapse:collapse;><tr style=color:Black;background-color:#00BFFF;font-weight:bold;><th scope=col>Case ID</th><th align=center scope=col>Subject</th><th align=center scope=col>Status</th><th align=center scope=col>Date</th><th … | |
Re: CHECK THAT YOUR ID CONTAINS A VALUE OR NOT. I THINK YOUR ID DOES NOT CONTAIN VALUE... So THAT YOUR QUERY WILL BE LIKE WHERE ...= SO WHEN YOU EXECUTE THE QUERY GETS THIS ERROR. | |
Re: TRY WITH MY BELOW EXAMPLE. HOPE IT WILL HELP YOU. VB.NET: [Code=VB] Dim sClause as String Dim drItems() as DataRow sClause = "Price > 50" drItems = dsPrepopulatedDBData.Tables(0).Select(sClause) [/Code] C#.NET [CODE=C#] DataRow[] drItems = dtPrepopulatedDBData.Select( "Price > 50", "" ); [/CODE] | |
Re: HI, HOPE THE BELOW LINK WILL HELP READERS A LOT FOR CROSS-BROWSER NUMERIC VALIDATION: [URL="http://shawpnendu.blogspot.com/2009/03/cross-browser-javascript-isnumeric.html"]http://shawpnendu.blogspot.com/2009/03/cross-browser-javascript-isnumeric.html[/URL] | |
Re: The main obstracle for asp.net is hosing is too much expensive. | |
Re: HI, You can try with my below post. Hope it will help you. [url]http://shawpnendu.blogspot.com/2009/04/disable-right-mouse-clickimage.html[/url] | |
Re: BETTER YOU VISIT: [url]http://www.highoncoding.com/Articles/205_Searching_Inside_the_GridView_Control.aspx[/url] | |
Re: To upload file into server follow the below sample code: [code] protected void cmd_Upload_Click(object sender, EventArgs e) { string s_Image_Name = txt_Image_Name.Text.ToString(); if (FileUpload1.PostedFile != null && FileUpload1.PostedFile.FileName != "") { byte[] n_Image_Size = new byte [FileUpload1.PostedFile.ContentLength]; HttpPostedFile Posted_Image = FileUpload1.PostedFile; Posted_Image.InputStream.Read(n_Image_Size, 0, (int)FileUpload1.PostedFile.ContentLength); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["TestConnection"].ConnectionString); SqlCommand … | |
Re: Just declare those variables at the top of the page_load method or just below the partial class of your aspx.cs file. Then you will use those variables into the aspx page. | |
Re: Yes you does not assign connection into your SqlCommand. | |
Re: I don't think you can do this. I can't understand why your indexing hampered? | |
Re: You can read the below post: [URL="http://dotnettipsandtricks.blogspot.com/"]http://dotnettipsandtricks.blogspot.com/[/URL] | |
Re: You can try with below technique: If you use Sql Server Management studio then: open. Connect to the remote server.Right click on the server instance.Select properties. Click Connections.Check to allow remote connections to this server. | |
Re: Replace your javascript function by below one: [code] function boxTicker(formName, boxId){ var box = formName.document.getElementById(boxId); if (box.checked == false){ box.checked = true; alert("Ticked!"); } } [/code] | |
Re: for yes checkedchange also set visible to false for requestedby control & viceversa. | |
Re: How you define your connection string in your application? | |
Re: HI, I THINK YOU WANT TO UPDATE A TBALE BASED ON ANOTHER TABLE IN A SINGLE QUERY. IF SO THEN YOU CAN FOLLOW THE MODEL. HERE I AM TRYING TO GIVE YOU AN EXAMPLE ON HOW YOU CAN DO THIS: [CODE] update TBL1 set TBL1.COL = TBL2.COL2 from TBL1 inner … | |
Re: Yes you can't achieve this by using identity column. Better try to generate Id from application end. | |
Re: I didn't understand your problem. My observation is your code looks ok. | |
Re: You need to write a loop through reader. Mostprobably you just read & after that you are doing nothing. Please post your sqlreader full segment. | |
Re: Write the below handler for your GridView: [code] protected void gvEdit_PageIndexChanging(object sender, GridViewPageEventArgs e) { gvEdit.PageIndex = e.NewPageIndex; DataTable dtSupplier = (DataTable)ViewState["dtSupplier"]; gvEdit.DataSource = dtSupplier; gvEdit.DataBind(); } [/code] | |
Re: I thought that you have use commandargument as an id for that row. Here is a sample code so that you get an idea how one can do this: [code] foreach (GridViewRow oItem in gvListofSources.Rows) { clsDbUtility.ExecuteNonQuery("UPDATE Source SET txtStatus='" + ((DropDownList)oItem.FindControl("cboStatus")).SelectedValue + "' WHERE ID=" + oItem.Cells[0].Text); } [/code] … | |
Re: Yes you can use the technique to convert first date in a textual format for displaying & use built in function to get day difference. There are a lot of styles available for converting datetime to string. Please Google if needed. | |
Re: Also one can use url as email signature which may generate a good number of traffic. | |
Re: Yes you need to format date within your gridview row. Some of the example is given below:| [code] <asp:BoundField DataField="LastDelivery" HeaderText="Recent Delivery" DataFormatString = "{0:y}" HtmlEncode="false"></asp:BoundField> [/code] For more styles you may read: [URL="http://shawpnendu.blogspot.com/2009/04/how-to-format-gridview-rowscolumns-in.html"]http://shawpnendu.blogspot.com/2009/04/how-to-format-gridview-rowscolumns-in.html[/URL] | |
Re: you can try with below query: [code] SELECT tblPlayer.FirstName, tblPlayer.LastName, SUM(tblRecords.Wins), SUM(tblRecords.Losses) FROM tblPlayer CROSS JOIN tblRecords GROUP BY FirstName,LastName [/code] | |
Re: You can use the below javascript to validate numeric number. [code] function bINT(sText) { if(isNaN(parseInt(sText))) return false; } [/code] Modify your textbox to call the javascript method like below: [code] <asp:textbox onkeypress="return bINT(String.fromCharCode(event.keyCode));" id="txtINT" runat="server"></asp:TextBox> [/code] | |
Re: Yes its postback issue definitely. Wrap your page load event within the condition below: [code] If Not IsPostBack Then 'Your code here ..... end if [/code] | |
Re: I think either your connection string has the problem or the user has no permission to connect to the server. Did you get any "Remote connection" type error? | |
Re: Try with the following way: [code] If ((CheckBox)D.FindControl("CheckBoxPurchase")).Checked Then SQL = "INSERT INTO Trx VALUES('" & TrxID & "')" End If [/code] | |
Re: You can try with below sample: [code] CONVERT(INT,SUBSTRING(Slab2A_Time_From,1,3)) [/code] First collect first 3 character then convert those into int. For example If your range length is 3 then substring 3rd parameter will be 3. Or you can move 1 by 1 like if firstcharacter is a nmuber then collect until … | |
Re: You can achieve this by writing a javascript function like below: [code] function copyToClipboard(s) { if( window.clipboardData && clipboardData.setData ) { clipboardData.setData("Text", s); } } [/code] | |
Re: Make the following change in the node of the system.web section of the web.config file: [code] <httpRuntime maxRequestLength="11000" executionTimeout="275"/> [/code] If does not resolve then post exact error message. | |
Re: Also you can write: [code] DELETE FROM User WHERE UserId BETWEEN 1915 AND 1945 [/code] | |
Re: You can follow the below way: [code] //open your connection here for(int i=0; i<Convert.ToInt(TextBox1.Text);i++) { // insert HERE } //close your connection here [/code] | |
Re: For dropdown you can read my below post on C#: [url]http://shawpnendu.blogspot.com/2009/05/how-to-bind-or-populate-data-into.html[/url] Read the above link if you need to know how to bind data into dropdownlist as well as how to read selected text. | |
| |
Re: Write sql in the following way: [code] SELECT MAX(CONVERT(INT,RIGHT(user_id,3)))+1 from master [/code] Will give you the incremented number Now pad FMS & 0 if required by using length of your max func return value. | |
Re: Check that controls were placed inside form tag of your html markup page. | |
Re: You can create a view dynamically in the following way: [code] Declare @SQL nVarChar(1000) Select @SQL = 'Create View Auths AS (SELECT au_id, au_lname, au_fname FROM Authors)' Execute pubs.dbo.sp_executesql @sql [/code] | |
Re: HI, You can use the below javascript method to read asp radio button list selectindex, selected value. [CODE] <script type="text/javascript"> function GetRadioButtonSelectedValue() { var AspRadio = document.getElementsByName('Aspradiobuttonlist'); for (var i = 0; i < AspRadio.length; i++) { if (AspRadio[i].checked) { var lblAspradiobuttonValue = document.getElementById('<%= lblAspradiobuttonValue.ClientID %>'); lblAspradiobuttonValue.innerHTML='<b>Selected Value:</b> '+AspRadio[i].value+'<br/>'; lblAspradiobuttonValue.innerHTML+='<b>Selected … | |
Re: Your query won't work. Cause you does not specified non aggregated columns in group by clause. I can't understand what is you requirement. But you can try with below one: [code] SELECT case_id case, Count(case_id) [case count], max(created) [last update] FROM case_score_t cs WHERE cs.user_id = 1449 GROUP BY cs.case_id; … |
The End.