- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
47 Posted Topics
hi you need to write the connectionstring first which is used to establish a connection between your database and application. create a db with table name as table_details and fields as fname, lname with varchar type. Let us take two textboxes with id text_first and text_last. in button_click event you …
[QUOTE=yash777;918333]Hello , I would like to count the no of hits to my website. How do i do it? whether I need to code it in Global.asax file in application on start ?????? Reply[/QUOTE] Hi you can place the code in Global.asax file and u need to call that variable …
Hi you can use the following query. declare approved as 'varchar' [code] select projectid,projectname,path from projecttable, phototable where projecttable.projectid= phototable.projectid and phototable.appoved like 'true' [/code] Let me know if you face any problem with this query.
Hi you can write two seperate insert queries on single button click... y r u opting for single query.. if u need that let me know.. please follow this.. [code=sql]INSERT INTO Names (person1, Address, Postcode) VALUES (@person1, @Address, @Postcode) //this is first query INSERT INTO Group (GroupName) VALUES (@GroupName) //this …
Use the following code.. here my textbox id is TextBox1 and database name :records Table name: data [code] using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; public partial class Default2 : System.Web.UI.Page { SqlConnection con = new SqlConnection(@"Data Source=WINKC185045-MAB\SQLEXPRESS;Initial Catalog=Records;Integrated Security=True"); protected …
hi please use the following... take a checkbox .. and give the text property as ur wish... (here i have given hello) default.aspx: source code [code] <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> …
Hi Use session.Abandon(). It will automatically closes all the sessions opened upto that function.
hi use the following code.. int res=0; res = Convert.ToInt32(TextBox1.Text) + Convert.ToInt32(TextBox2.Text); TextBox3.Text = res.ToString(); Let me know your comments. If It solves ur problem mark it as solved.
hi you need to set the autopostback properties of all dropdownlists to "TRUE" and then you need to write the code in the select-indexchanged event.
hi use and try the following code.. Create a folder images and place logo.jpg and Redbik.jpg in that folder. source code: [code] <asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/myAds.xml" OnAdCreated="AdRotator1_AdCreated" /> [/code] myAds.xml: [code] <?xml version="1.0" encoding="utf-8" ?> <Advertisements> <Ad> <ImageUrl>images\Logo.jpg</ImageUrl> <NavigateUrl>http://www.site1.com</NavigateUrl> <AlternateText>Site1 Main</AlternateText> <Impressions>50</Impressions> <Keyword>Product1</Keyword> </Ad> <Ad> <ImageUrl>images\RedBik.jpg</ImageUrl> <NavigateUrl>http://www.site2.com</NavigateUrl> <AlternateText>Site2 Main Page</AlternateText> …
Hi Friend, For web developement you have to use ASP.NET with default language as either C# OR VB. For pure windows application youneed to use VB.NET OR C#.NET.
hi sajjad, Here you need to use session concept. When ever a newuser is logged into the site from the login page ->it will automatically sets a session to that user (if the user is valid) then it will redirected to welcomepage. During the signout u need to kill that …
hi sam... here i am fetching the data from the db and assing that data to a string array... code is ... [code] protected void Page_Load(object sender, EventArgs e) { SqlConnection con = new SqlConnection(@"Data Source=WINKC185045-MAB\SQLEXPRESS;Initial Catalog=Records;Integrated Security=True"); SqlDataAdapter da = new SqlDataAdapter("select name from data", con); DataSet ds = …
Hi coollife, u need to place that image in the project folder in the soln explorer i.e., from the path that ur running the appln. Then it will give the image of the givenpath
Hi Riyas, as earlier suggested.. you can directly write that xml file into a string and you can print on the webpage. here textbox1 is a textbox with multiplelines... [code] protected void Page_Load(object sender, EventArgs e) { string xmlData = System.IO.File.ReadAllText(@"C:\test.xml"); System.IO.File.WriteAllText(@"C:\test.xml", xmlData); TextBox1.Text = xmlData; } [/code]
.Net framework in short form is: Multiple languages on one platform...
explain ur question clearly??
Here is my code... i have taken a page called image.aspx in that the following is the source code (which consists of a griview with hyperlink) [code] <%@ Page Language="C#" AutoEventWireup="true" CodeFile="image.aspx.cs" Inherits="image" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> …
Use ajax and refresh the part of page not the whole page
You need to check the location of the file once... usuallly this error will occur when ever the location of path is incorrect...
please set "autopostback" property of comboboxes to true....
hi Rohan, You have to include one more field in your citymaster table i.e., categoryid which is a foreignkey between category and citymaster tables. Let me know if u want further ???
hi... you need to remove a line from ur code... [code] Response.Write("Success1Success2"); [/code] let me know.. if u face pbm still
i think you need to use Session.Abandon() method to kill the session...
hi friend please use the following code...in button click [code] protected void Button1_Click(object sender, EventArgs e) { Calendar1.SelectedDate = Convert.ToDateTime(TextBox1.Text); } [/code] tell me whether this solves or not.
have u set the autopostback property to true?? clear your question once...
hi use window.open in ur script dont redirect that page. then it willopen a seperate window. [code] <script language="javascript" type="text/javascript"> function btnWeek_onclick() { window.open("date.aspx"); } </script> <body> <asp:Button ID="Button1" runat="server" OnClientClick ="return btnWeek_onclick()" Text="Button" /> </body> [/code] Let me know if u face any problem further
hi you can modify it as follows. string CommandText = "SELECT * FROM table1 WHERE emp_bookid='"+id+"' "; Let me know if you face any problem with this. // id syntax in clear way = ' "+id+" '
Hi IE wont support tif files to display. so u need to convert that tif into gif or any otherformat. The following is some sample code. Hope it helps u. [code] System.IO.Stream _stream = new System.IO.FileStream(@"img\Calendar2008.tif", System.IO.FileMode.Open); Bitmap _bmp = new Bitmap(_stream); Context.Response.ContentType = "image/gif"; _bmp.Save(Context.Response.OutputStream, ImageFormat.Gif); _bmp.Dispose(); _stream.Close(); [/code]
hi anuj, why are you using gridview for single row then? you can take a table which looks like a gridview with single row (with ur 2 columns)? Please let me know if you are using a grid view with single row or multiple rows? Regards, Phani
Hi you can use webbrowser control in the windows application. Best Regards, Phani
Hi You can use a gridview with only 2 hyperlink buttons and remaining columns as some importent details. In that buttons are "select" and "delete". okay? when ever u click on select button ur page will redirected to anotherpage with that id as a querystirng. In the second page u …
hey you can use the following code.. it may help u out... [code] <%@ Page Language="C#" %> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Label1.Text = "Start"; } TextBox1.Attributes.Add("onkeyup", "rewriteLabel()"); } </script> <script type="text/javascript"> function rewriteLabel(){ TextBox1.Text = Label1.text; } </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head …
Hey use.. url mappings in webconfig file... please refer the following [url]http://davidhayden.com/blog/dave/archive/2005/12/07/2613.aspx[/url]
Hi Pankaj, I had a doubt in your question. Why dont u directly bind the grid with out that field (column). Y do u want that as a hidden entry in gridview. [[COLOR="Green"]COLOR="Red"]Best Regards, Phani Chavali[/COLOR][/COLOR]
Hey .. after you found the solution just please mark it as solved... so that everybody can easily refer....... Thanks, Phani
Hi you can use the following code..........for creating xml document with your nodes.... [code=aspnet]XmlDocument xmlDoc = new XmlDocument(); XmlDeclaration xmlDeclaration = xmlDoc.CreateXmlDeclaration("1.0", "utf-8", null); XmlElement rootNode = xmlDoc.CreateElement("proposalRequests"); xmlDoc.InsertBefore(xmlDeclaration, xmlDoc.DocumentElement); xmlDoc.AppendChild(rootNode); XmlElement parentNode = xmlDoc.CreateElement("proposal"); parentNode.SetAttribute("ID", "01"); xmlDoc.DocumentElement.PrependChild(parentNode); XmlElement mainNode = xmlDoc.CreateElement("name"); XmlElement descNode = xmlDoc.CreateElement("contactNo"); XmlElement activeNode = xmlDoc.CreateElement("city"); …
Hi, You can use the itemtemplate to display the date according to ur format. the following is code snippet... Hope it help u.. [code=asp.net]<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="False"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%#Bind("Joining_Date","{0:dd/MM/yyyy}")%>'></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>[/code] Best Regards, Phani Chavali
Hi, I have some doubts on your question. u want to send a mail from the details view-> by clicking on the email id?? right?? Canyou please suggest me .. what are the main things we need to cosider in designing a website. Mainly for asp.net professionals -> what we …
Hi Friends, I want to know my PF amount which i saved in my previous company. If you know any link related to PF please provide me. I have the pf account number with me. Thanks, Phani Chavali
Hi you can set the navigateURL property as follows... <asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="~/images/Avatars/12.gif" NavigateUrl="~/Default2.aspx">HyperLink</asp:HyperLink> BYE..
The End.
kameswari