- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 3
107 Posted Topics
I have created an MS Access Query named **GetContactCategory** select GetCategoryNames(contactId) as CategoryNames from Contacts The Function **GetCategoryNames** is the function written in a module of same database. Now when i call this query in my c# application using ADO.net it throws error. Following is my c# code ` using … ![]() | |
Following is the code which sends single embedded image very fine from Outlook using c# public void sendEMailThroughOUTLOOK() { try { Outlook.Application oApp = new Outlook.Application(); Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem); string imageCid = "image001.jpg@123"; oMsg.HTMLBody = String.Format("<body><img src=\"cid:{0}\"></body>", imageCid); Attachment attachment1 = oMsg.Attachments.Add(@"E:\wallpapers\WRLDMAP.jpg", OlAttachmentType.olEmbeddeditem, null, "img"); attachment1.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001E", imageCid); //Add an … | |
Re: [code] using System.data.sqlclient; [/code] // add here other necessary name spaces follow the steps declare following items globally [code] dataset ds=new dataset(); static int count=0; [/code] 1. write the following code in your page_load/form_load(in case of window application) [code] sqlDataAdapter adp=new SqlDataAdapter("select * from tablename", yourconnectionstring); adp.fill(ds); label1.text=ds.tables[0].rows[count][0].tostring();//this code will … | |
I am developing a winform application. I have menu like Edit -> Copy and Edit -> Paste. Instead of using Clipboard class to do copying and pasting can I use Operating System's ability to Copy and Paste text, image, link, etc... | |
How do I open a Word document and feed its contents as the body of an email message using OpenXML and C#? | |
How many ways are there to assign roles to users in MVC? | |
I am building a winform Application. I have to create buttons dynamically based on data fetched from database. I followed following steps Created UserControl On UserControl_Load event I fetched data from database. I populated the UserControl with buttons based on number of rows i get from the database. The above … | |
I have developed a windows application. My development environment is win7, office2007, C#, VS2010, Winforms. My application stores data in MS Access. Is there any way with which i can create a connection string based on Oledb driver version present in PC? | |
Is it possible to implement theme of Microsoft Office in my windows application. I mean when anyone changes theme of Microsoft Office it should also make change the theme of my windows application. If its possible, let me know how to do that? | |
I get an error message when i open an MVC project. The error is attached as screenshot. While the same project opens in another machine. Steps taken by me to solve the problem •Installed IIS •Given permisssion to "inetpub" folder •Uninstalled IIS and installed IIS Express •Opened Visual Studio as … | |
Hello all I having an issue in logging into a website using webRequest and WebResponse. I thought let me reach out to experts by posting a question. I am trying to login in http://www.mbhatt.in and want to access the page after the login is successfull. I used following code to … | |
Re: Try this try { ClientScript.RegisterStartupScript(this.GetType(), "Msg", "return confirm('Do you want to save the WH XML file created?');", true); } | |
I used following code to connect oracle database from C#. But i get this error "**invalid login credentials**" using (Oracle.DataAccess.Client.OracleConnection cn = new Oracle.DataAccess.Client.OracleConnection("Data Source=abcSource;User Id=abcUserId;Password=abcPassword;") { cn.Open(); } While if i try following code to connect database from C# I succeed. using (System.Data.OracleClient.OracleConnection cn = new System.Data.OracleClient.OracleConnection("Data Source=abcSource;User Id=abcUserId;Password=abcPassword;")); … | |
Re: Use Dictionary instead of arraylist [http://www.dotnetperls.com/dictionary](http://www.dotnetperls.com/dictionary) | |
I have a datagrid "dgData" AutoGenereateColumns="true" In this i have 2 templateFields. Now i want to populate all the data between these 2 template fields. How can i do this using C# ![]() | |
`insert into table1 (Wicket,Run,Catch) values (Wicket+2,Run+22,Catch+5)` This statement is used to insert data using StoredProcedure. How can i insert data same way without using storeprocedure but using LinqToSql. What will be code for it. | |
I added new database file in my solution's app_data folder in VS2008. But when i tried to expand it from SERVER EXPLORER, i get this error An attempt to attach an auto-named database for file ___ failed. Find the screen shot of the error which occured in vs2008 IDE. [http://www.eggheadcafe.com/FileUpload/1619491694/Errordb.jpg](null) | |
I am facing a problem for running my website. I have developed the website and when i hit F5 to view the results i am presented with this error **Description:** The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission … | |
Re: Woderful post SKname It helped me very much. Thanx. | |
I have created threads dynamically. static void Main(string[] args) { int ThreadCount = Convert.ToInt32(ConfigurationManager.AppSettings["Threads"]); List<Thread> th = new List<Thread>(); for (int i = 0; i < ThreadCount; i++) { Thread t = new Thread(print); th.Add(t); } foreach (Thread t in th) { t.Start(); } } public void print() { console.writeline("123"); … | |
http://localhost/Project.html?ProjectId=P6610C32F-7C54-4221-A190-A9E7E08F8B08 This is my weburl. I want to retreive query string value of variable "ProjectId" How i can do this using vbscript and html page | |
Re: Replace the gridview code with the following code <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false> <columns> <asp:TemplateField HeaderText="Image Column"> <ItemTemplate> <img src='<%#Eval("Image")%>' alt="display image"/> </ItemTemplate> </asp:TemplateField> </columns> </asp:GridView> | |
Re: Try this private void button4_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Data Source=user-PC;Initial Catalog=URBAN-AUTO-CLINIC;Integrated Security=True;User Instance=False"); DataSet ds = new DataSet(); SqlCommand adaptor = new SqlCommand("SELECT FirstName,LastName FROM ClientNCar WHERE [FirstName] ='" +txtFName.Text.Trim() +"' AND [LastName]='"+txtLName.Text.Trim()+"'",conn); SqlDataAdapter adp=new SqlDataAdapter(cm); adaptor.Fill(ds); ClientSearchDisplay.DataSource = ds.Tables[0]; } | |
Re: I think there is no need to assign the port. It might work. Comment the following code smtp.port=465; and then try to send. | |
Re: I got perfect solution for your question here is some informationary content which will help you visit [URL="http://markand-bhatt.blogspot.com/"]http://markand-bhatt.blogspot.com/[/URL] | |
I am having a problem in adding Chart control to my Toolbox. When i click [B]Choose Items[/B] from my Toolbox Context Menu, my VS 2008 crashed down, and gets closed. So I am finding another way to add chart control to my toolbox. So I need help in adding chart … | |
I have a crystal report named CR1. Now i want to populate the data from multiple tables into my crystal report CR1. I am using VS2008 and coding language is C# in ASP.net Any help will be appreciated. | |
I am having a table named "Society" And 5 master tables "BlockA","BlockB","BlockC","BlockD","BlockE". The "Society" table contains the foreign key columns of all the 5 master tables. Now when i write the select query it takes a lot of time to execute, as 5 tables are referencing one table and joining … | |
I am getting this error. But i cant find out the reason why i am getting this error [COLOR="Red"]Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding … | |
I want to create a SQL login in SQL2005. I tried creating it but it gives me error message [COLOR="Red"]"Create failed for login 'username'. User does not have permissions to perform this actions"[/COLOR] What to do now to create a SQL login in sql 2005 | |
I have two classes named [B]ROAD[/B] and [B]PATH[/B] [CODE] public class ROAD { public string getData() { return "Marlton Road"; } } public class PATH { public string getData() { return "Tagore Path"; } } [/CODE] Also i have a function named FETCH() in my Static Void Main FETCH() contains … | |
i have a image file with extention .tif I have set ports for sending and receiving file. I have configured sending port to a folder and receiving port to a folder. My sending folder's name is send1 and receiving folder's name is receive1. Now i want to do that whenever … | |
I m having a problem in showing chart with datatable. I want to show my chart as shown in below image. | |
I have a panel named "listState" on my aspx page Now in that panel i have number of dropdowns. I want id of that all dropdownlist present in "listState" How can i do this using JQUERY I tried following code $('#<%=listState.ClientID%>').find("select") But it doesnt gives me id of all dropdownlist. … | |
I have several radiobuttons. I have attached my jquery to this radio buttons When i call this jquery i want the control's id from which this jquery is called. i tried following technique $(this).attr('id'); but i failed. How to find this. Thank you | |
Re: I Checked my disk usage. it shows me 90% empty drive. then also i m getting this error ![]() | |
I am developing an application in Classic ASP My database is SQLSErver 2008 I am getting a problem in connecting to my database. Here is the code which i used to connect. [CODE] connstring ="server=mymsever;database=mydb;Trusted_Connection=Yes;" set conntemp = server.createobject("ADODB.Connection") conntemp.ConnectionString=connstring conntemp.Open() Response.Write(conntemp.State) [/CODE] The last statement is for the confirmation … | |
I have a textbox named "txtMoney" I want to validate this textbox using javascript. And its validation criteria are as follows [LIST] [*]Negative number is not allowed [*]All numerics. No letters [*]Only two digits after decimal [*]Maximum 12 digits including decimal [/LIST] How can i do this. | |
Hello friends. I have a webpage (my.aspx). In that page i have some controls inside div tag and some controls outside div tag. Now i want the html source of those controls which are [B]inside[/B] div tag using JAVASCRIPT. How can i do this. I got the code with which … | |
I tried steps to make a sample application in lightswitch. But when i execute this application and tried to save the data, i m getting this error “Submit operation failed. The remote server returned an error: NotFound.” waiting for reply Markand Bhatt | |
I have a table named "Table1" Its schema with data is like this [CODE=text] Id col2 col3 col4 col5 isUnique dbUnique 1 red 3M 1995 UK 1 null 2 red 3M 1995 UK 0 null 2 red 3M 1995 UK 0 null 3 red 3M 1995 UK 0 null 4 … | |
I have a linkbutton named "linkbutton1" on my webpage in asp.net(c#) Now i want to change color of linkbutton1 when it gets disabled. I want to do this using an event which will fire on disabled process of linkbutton Same as there is an event of RowDatabound in gridview control, … | |
I have a query in stored in a variable @query I execute that query using following statement [COLOR="Green"]execute[/COLOR](@query) I want the number of rows returned by executing above statement in sql server How can i get that? | |
Re: Your Code works very fine. I tested it. This code shows Random number generation using .CS file [CODE] protected void Next_Click(object sender, EventArgs e) { Label1.Text = Random1Number().ToString(); } public double Random1Number() { //declares random number generator Random generator = new Random(); //returns a random number between 10 and 30 … | |
I am using SQL2008. I want to generate log file of each and every transaction carried out on my table. How can i do this? | |
when user tries to access a restricted page with a querystring parameter eg myaccount.aspx?sid=3&page=2 and is not authenticated, user will be redirected to login.aspx page. the problem is that the querystirng (sid=3&page=2) will be lost . the returnURL will be like "login.aspx?returnurl=myaccount.aspx". is there any solution for that? thanks. | |
I have added a .xml file to application resources. Now I want to access that xml file and fill dataset using that xml file in c#.net Can anyone help that how can i do this in C#.net | |
How to custom control's property to new category in property window in asp.net as for example [CODE] [Category("Appearance")] public string GridCssClass { set { CssClass = value; } } [/CODE] this code will add Property GridCssClass to Property window under Appearance Category My Question is that i want to make … | |
I have an Ajax Tab Panel on my webpage with three tabs in it. On my first tab i have some textboxes. Now I want to give Alert message to user if user navigates to another tab after changing value of any of the text box. I want to perform … ![]() |
The End.