 |

|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|

|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|

|
Hi I have a SQL Server Table named News with the following
columns-id,Title,Body,Created datetime and
Inside It's a column 'Number of clicks'.
Now I want to increment it by 1 when the title of a particular news is clicked.I need the c# code.Help, i can't do it
|
|
|
|

|
There's no code. You should use Google & put your effort for start, then come here for help hereafter.
You just need to update the value(increment) of "Number of clicks " column for particular ID (when you click particular news). Query should be like below
UPDATE Table_Name SET Numberofclicks = Numberofclicks+1 WHERE ID=@ID
Customize this sample[^]
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|

|
I have an requirement for dynamic report generation. like the user itself select the tables, columns, filters, groupby etc.,
once they selected all they will be able to see report.
I need to know how to do this.. To be clear
have u seen "Query designer" in sql mgmt. studio... same as this I need to generate the query.
please help me . Its urgent
Thanks
Ravi
|
|
|
|

|
This is referred to as "ad hoc" reporting. If you search for ad hoc tools there are 3rd party products that do a good job. Or, if you know SSRS some you can use SSRS. It has a Report Builder built into it. You'll have to expose a Report Model which is a representation of your data and then the users can pull whatever fields you have exposed.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|

|
hi,
I've designed this user control(*.ascx) in asp .net,
<script type="text/javascript">
function but_ok() {
window.returnValue = "ok";
window.close();
}
function but_cancel() {
window.returnValue = "cancel";
window.close();
}
function but_yes() {
window.returnValue = "yes";
window.close();
}
function but_no() {
window.returnValue = "no";
window.close();
}
</script>
<asp:Button ID="dlg_ok" runat="server" Text=" OK " />
<asp:Button ID="dlg_cancel" runat="server" Text=" Cancel " />
<asp:Button ID="dlg_yes" runat="server" Text=" Yes " />
<asp:Button ID="dlg_no" runat="server" Text=" No " />
and i've written these codes to assume each button behavior
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
dlg_ok.Attributes["onclick"] = "javascript:but_ok()";
dlg_cancel.Attributes["onclick"] = "javascript:but_cancel()";
dlg_yes.Attributes["onclick"] = "javascript:but_yes()";
dlg_no.Attributes["onclick"] = "javascript:but_no()";
}
}
now I want to show this page like a dialog and use it as a message box,
so I have 2 questions
1-how do I display this control or an aspx page like a dialog?
2-how do I retrieve values after clicking each button?
I will appreciate if any one could help
|
|
|
|

|
Request you to post in only one forum.
|
|
|
|
|

|
thanks, this is good
but I want to show a modal dialog when user clicks a button
and how can I retrieve values of the buttons?
|
|
|
|
|

|
hai..
how to give two or more .aspx pages to one response.Redirect() method
|
|
|
|

|
While you should do that?
Client can only display one page for the current connection, so even you were able to do so (and you don't), client will not see both...
Try to describe your problem we may have a suggestion for you...
|
|
|
|

|
Hi,
a report like data that shows OrderId, ProductCode, Qty, UnitCost, Total, an Order may contain several products at the same time. Now I should disply Order Id on top under that ProductCode, Qty, UnitCost, Total information, the total for the order under the totals section. In the end of the page I have to display Grand Totals. just like report, this is the requirement. The challenge here is Order Id should not be repeated, it should come once on top then under that all its items, and then Under that Total Qty and Total Amount. At the end of the page grand totals which we can use Html table to display that.
But challenge is Order Id under that ProductCode, Qty, UnitCost, Total and under that totals related to the order Id.
Can anybody please suggest me which Web control in ASP.Net I can use to display this type of UI? Any like or any suggestion is greatly helpful. Its an urgent need.
Thanks in advance for the help.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|

|
what happened I don't know no body is replying me, can anybody please give me some advice or some thing. Or should I drop it off completely.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|

|
You have posted this question on ....
17. Friday. Most people were ready to leave office early.
18 & 19 - for weekend celebration.
20 - (Monday) is busy day for most of us.
21 - We missed your question because of new questions.
22 - We just noticed your question.
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|

|
I am trying to incorporate a ViewModel as I am using edmx file to define my db, but my view only works with the edmx model and sends an unexpected result when I use my ViewModel.
My ViewModel is;
public class GetQuestionViewModel
{
public class Question {
public Question Questions { get; set; }
public Response Response { get; set; }
}
public GetQuestionViewModel()
{
this.QuestionOptions = new HashSet<QuestionOption>();
this.Responses = new HashSet<Response>();
}
[Key]
public int Id { get; set; }
public int PageNumber { get; set; }
public string Question1 { get; set; }
public int QuestionTypeId { get; set; }
public Nullable<int> LinkedTo { get; set; }
public Nullable<int> Options { get; set; }
public Nullable<int> QuestionRanking { get; set; }
public virtual ICollection<QuestionOption> QuestionOptions { get; set; }
public virtual QuestionType QuestionType { get; set; }
public virtual ICollection<Response> Responses { get; set; }
}
And my Action is;
[HttpGet]
public ActionResult ViewQuestion(int? id)
{
if (id == null || id == 0 || id > 13)
{
id = 8;
}
Question question = db.Questions.Find(id);
if (question == null)
{
return HttpNotFound();
}
return View(question);
}
I tried changing the Question question = db.Questions.Find(id); to var question = db.Questions.Find(id);
but nothing I have tried works. I want to get the ViewModel working before I build the query;
Question questions = (from q in db.Questions
from qo in q.QuestionOptions.DefaultIfEmpty()
from r in q.Responses.DefaultIfEmpty()
where q.PageNumber == page && r.UserId == userId
select new Question
{
Id = q.Id,
QuestionType = q.QuestionType,
Question1 = q.Question1
}
This is my first MVC project and I am really struggling although I have followed several online tutorials. I would be grateful for any help.
|
|
|
|
|

|
im using datalist control to display the data long with image, address and button.im using label control to display the data in datalist. if i click on more button in datalist control the page must be redirected to that particular page. But i could not do this.how to redirect when i click on button in datalist to that page ?
|
|
|
|

|
which technology give more scope in future in prospect of learning
|
|
|
|

|
All of them. You are asking us to foretell the future, and even the industry experts don't always get it right.
Veni, vidi, abiit domum
|
|
|
|

|
As a part of project I need to present a 3D scatter plot in a web page based on the 3 columns data from a table from database. Is there a way to draw a 3d scatter plot in ASP.Net.
|
|
|
|
|

|
Good day everybody. I'm designing a chat with asp.net, and everything is working except one. I want to retrieve the newest 15 records then delete the old ones. I used count to get the number of records in my table then specify that if count is equal to 20, then, I used sql Top statement to delete the Top 5 messages. But I found that sql server sort whatever is inserted in alphabetical order. And this technique delete both the newest messages. Please, some should tell me how to achieve this. Thanks in advance.
|
|
|
|

|
You need to sort the messages into the correct order first. Use the SQL ORDER BY clause[^].
Veni, vidi, abiit domum
|
|
|
|

|
Goodmorning to everyone!
I've putted this xml file into mediafire hosting. Here its link:
LINK MEDIAFIRE FILE.XML
And there is my stupid code:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
namespace ProvaParsingXml
{
class Program
{
static void Main(string[] args)
{
string str = @"C:\Users\c.capannini\Desktop\file.xml";
XDocument xml = XDocument.Load(str);
var hosts = from h in xml.Descendants("address")
select new
{
addr = h.Attribute("addr").Value,
addrtype = h.Attribute("addrtype").Value,
};
foreach (var host in hosts)
{
if (host.addrtype == "ipv4" || host.addrtype == "ipv6")
{
Console.WriteLine("Host : " + host.addr.ToString());
var ports = xml.Descendants("port");
foreach (var port in ports)
{
Console.WriteLine("Port = " + port.Attribute("portid").Value.ToString());
var script = port.Element("script");
if (script != null)
{
var pem = script.Descendants("elem").FirstOrDefault(n => n.Attribute("key").Value == "pem");
string pemm = pem.ToString();
pemm = pemm.Replace("<elem key=\"pem\">", "");
pemm = pemm.Replace("</elem>", "");
Console.WriteLine("PEM = " + pemm);
break;
}
}
}
}
Console.ReadLine();
}
}
}
Why don't the port and pemm string not change? How can i get for each host their ports and for each port the string value inside tag ?
How can i do it?
Please help me. I'm going crazy!!!
Thanks!
|
|
|
|

|
An XML comment in the file says that it was generated ny nmap. Hence I'd suggest to look at the nmpa documentation for an XML Schema Definition file (xsd). You can create corresponding classes from the xsd automatically.
|
|
|
|

|
Hello friends, please I need your advice on this. I'm designing a site where students can pay their school fees online. I have a page where students can enter their bank details then submit for confirmation. Now, the challenge is how can I verify if the bank details are existing, then, if the details exist, the school fee amount should be deducted from his/her acount then transfer the money to the schools' account? Please give any ideal. Thanks for your help so far because without your help, I wouldn't have reached this stage in programming. I'm using asp.net
|
|
|
|

|
This is called a payment gateway or payment processing. You need to sign up with one and integrate its API to process payments. Search Google for "asp.net payment gateway".
Edit:
Also, unless you want to be financially responsible for any breach of data that happens with your students bank details, I would avoid storing these details on your own system, use a gateway that allows storage of these on their site like PayPal so you aren't held responsible for it. Even big companies make mistakes (look up Target data breach), so avoid it at all costs.
|
|
|
|

|
Thanks Ron. I will use the method suggested by you.
|
|
|
|

|
But, when I have signed up with this paypal stuff, how will the processing take place? Do I have to provide the school's account to the paypal site?
|
|
|
|

|
Paypal has a help page that gives all that information, but in short, yes, you have to associate a real bank account with the paypal account in order for you to transfer funds.
|
|
|
|

|
It's called ACH
You use a payment gateway like authorize.net, pay the extra $20 a month, then code to the API and submit like a credit card.
I think you have to have a merchant account first, then select your compatible payment gateway, and then code to that API.
PayPal does it, but I think it's $6.00 per hundred to convert the paypal currency to US Dollars
|
|
|
|

|
Thanks Jkirkerx. After registering with this paypal company, do still need code in my website? If yes, how? Because I have no knowlege about this. You can direct me to some link that can help me know more details on how to achieve the coding of the API. How does the payment looks like? Is it every year I will pay this comapny or every month? Once again, thanks for reply!
|
|
|
|
|
 |
Message Automatically Removed
|
|
|
|

|
Why have you reposted this here? This is not an ASP.NET issue, please use the correct forum. And I notice that you already posted this in Q&A; and have been asked to provide details of the error.
Veni, vidi, abiit domum
|
|
|
|

|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Security.Cryptography;
using System.Drawing;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
RSACryptoServiceProvider myrsa = new RSACryptoServiceProvider();
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
openFileDialog1.Title = "Insert Image";
openFileDialog1.ShowDialog();
openFileDialog1.Filter = "JPEG Images|*.jpg|GIF Images|*.gif";
//object r = new object();
EventArgs en = new EventArgs();
string s1 = richTextBox1.Text;
string s2 = richTextBox2.Text;
string s3 = richTextBox3.Text;
string Chosen_File = "";
Chosen_File = openFileDialog1.FileName;
pictureBox1.Image = Image.FromFile(Chosen_File);
byte[] byteData = imageToByteArray(pictureBox1.Image);
string ToS1 = byteData.ToString();
Byte[] newdata = encoding.GetBytes(ToS1);
Byte[] encrypted = myrsa.Encrypt(newdata, false);
for (int i = 0; i < encrypted.Length; i++)
richTextBox4.Text += encrypted[i].ToString();
Byte[] decrypted = myrsa.Decrypt(encrypted, false);//decrypt
pictureBox2.Image = byteArrayToImage(decrypted);
}
public byte[] imageToByteArray(System.Drawing.Image imageIn)
{
MemoryStream ms = new MemoryStream();
imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
return ms.ToArray();
}
public Image byteArrayToImage(byte[] byteArrayIn)
{
MemoryStream ms = new MemoryStream(byteArrayIn);
Image returnImage = Image.FromStream(ms);
return returnImage;
}
}
}
Problem in Code :: When we decrypt the image back then it shows an error in "Image.FromStream(ms): during run time.
|
|
|
|

|
1. This has nothing to do with ASP.NET; please use the correct forum.
2. Please put your code between <pre> tags; use the code button above the edit window.
3. Please provide details of the error; where does it occur, and what is the exact text of the message?
Veni, vidi, abiit domum
|
|
|
|

|
Hello,
After converting MVC 4 project to MVC 5 I am getting an error "this website has redirect loop". In my web.config file I have the following:
<forms loginUrl="Account/Register" timeout"2880: />
When I try to click on any menu item, it tries to redirect to /Account/Register page. This was working fine before the conversion. How do I resolve this?
Thanks.
|
|
|
|

|
this code doesnt work in page which has masterpage ?
<asp:Content ID="Content1" ContentPlaceHolderID="ContentMaster" runat="Server">
<script type="text/javascript">
$(document).ready(function() {
$('html,body').animate({ scrollTop: 150 }, 1000);
});</script>
|
|
|
|

|
Define "doesn't work". Do you get a script error in your browser's developer tools?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|

|
You're missing the point. "It doesn't work" isn't enough information for anyone to diagnose the problem. You need to describe the problem fully, including the full text of any error messages.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
Thanks for all!
I have used like this and this is working now But how ???????
<script src="~/Script/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("html,body").animate({scrollTop: 230}, 1000);
});
</script>
I was missing :
<script src="~/Script/jquery.min.js" type="text/javascript"></script>
|
|
|
|

|
Member 9473809 wrote: I was missing :
<script src="~/Script/jquery.min.js" type="text/javascript"></script>
That's to be expected. You're using jQuery from your script block, so you need to include the jQuery script before it will work.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
how can we create a database design for automated symposium/conference management system
|
|
|
|
|
|
 |