 |
 |
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
|
|
|
|
 |
How do I pass an ID? It will need to be dynamically generated when the class is called.
thanks
|
|
|
|
|
 |
Going to need a few more details there. What exactly are you trying to do? Is this password strength rules validation or just out and out...logging in?
|
|
|
|
 |
So I'm completely new to ASP/MVC. Basically, I need to be able to create small site where the user logs in with network credentials that are validated against AD. I know how to do the AD validation part, but I do not know the proper way to authenticate the user for the web session with ASP. Can someone please give me a basic idea of how the authentication mechanism works here ?
Thanks,
Sam.
|
|
|
|
 |
how to add the addition kinda validation to my asp.net project using vb???
|
|
|
|
 |
What do you mean? Validation controls are on the toolbox.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
 |
i have a cart.aspx , details.aspx and default.aspx ... my menu bar has Home,Cars, Houses,Clothing, About Us, Contact Us
when i click cars i want onlys to appear on the details.aspx, if i click House i want only Houses to appear on my details.aspx page and if i decide to click Clothing i want only clothing details to appear also on that details.aspx page. i dnt want to create more aspx pages i want to have a query that will show cars details when i click the cars link. Please help Thanks
|
|
|
|
 |
Hi, this is very easy to achieve; all you have to do is bind the info source to a datalist, datagrid or repeater. Use a criteria to search depending on the option clicked by the user. Example, if a user clicked house, the criteria should be house. If you need code example I can provide.
|
|
|
|
 |
Thanks a lot please give an example with the code so that i can quickly impleament it
|
|
|
|
 |
you can use Model Pop Up to show this knid of Activity every thing will happen in Single Page... Instead of moving to other pages
PP
|
|
|
|
 |
i am not familiar with UML do i like to know when people draw UML Sequence diagrams and when people draw UML Activity diagrams. please give me a example like when people go for UML Sequence diagrams and when people go for UML Activity diagrams. thanks
tbhattacharjee
|
|
|
|
 |
Please ignore this question. It has been cross posted.
|
|
|
|
 |
i am new in mvc and just reading a article from this link http://weblogs.asp.net/scottgu/ef-code-first-and-data-scaffolding-with-the-asp-net-mvc-3-tools-update
view the below image there is two model class one is product and one is category and category class has one property called Products which return ICollection<Product>
and when generate UI with scaffolding pointing to product model class then UI generate with product details and a dropdown appear for category.
i just do not understand how scaffolding incorporate a drodown for category when generate a UI page for product. product has no link for category but how category related drodown comes in product page. just help me to understand it. thanks
see the below image to understand my issue.
https://mscblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_200981F6.png
https://mscblogs.blob.core.windows.net/media/scottgu/Media/SNAGHTML4d81d687_thumb_770E471F.png
https://mscblogs.blob.core.windows.net/media/scottgu/Media/SNAGHTML4e028a2f_thumb_1869D8BD.png
tbhattacharjee
|
|
|
|
 |
Good day friends! I have datalist control that displays messages. I want to add checkbox that will aid users to delete checked messages on heating delete button. But am finding it difficult because checkbox doesn't have commandname either commandargument. Please help!
|
|
|
|
|
 |
Good day friends! Please I need your help. Am using asp.net in my web design where users can send message to other registered users. Am able to get it work but I want the process whereby some can enter more than one email address by separating them with comma. Then, on heating the send button, the message should be send to all inputed email address.
|
|
|
|
|
 |
This is actually very easy my dear freind .u can use
string strEmailaddress = Textbox.text;
string [] EmailArr = strEmailAddress.split(',');
|
|
|
|
 |
Yo can use ther j query also if u are not getting proper answer i will give u the jquery answer replay for this
|
|
|
|
 |
Wow! Thanks alot. I will give this a try.
|
|
|
|
 |
i was using jquery datatable in webforms but data was more than 3000 records, client's browser gets stuck everytime. i used datagridview. but it is not good in performance. now i want to use again jquery datatable using MVC 5. please suggest me ,whether it will be useful or not. becuase in MVC razor engine returns the whole HTML to clients browser. there is no processing at client end in mvc. would appreciate if anyone answer me as soon as possible. Thanks in advance.
|
|
|
|
 |
Hi,
I hope you have implemented paging. If yes, you can send just 1 page of data in a request from the server.
Most of the client side tools are fast enough to handle 3000 records. I think the problem is not with jquery datatable. You might need to refactor your code.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
 |
i dont want to use paging in gridview.
i need all data on one page.
plz suggest me ,jquery datatable in mvc will be better approach or not. because i do not want to waste my time.
|
|
|
|
 |
If you don't want to use pagination then don't show all data at a time. use scroll paging as user will scroll down and data will be loaded.
|
|
|
|
 |
Why do you need 3000 items on one page? If it takes me 5 seconds to process each row it would take me 4 hours to do the page. What you'll probably need is something that loads the data on the fly with ajax, maybe implement it with an infinite scroll solution so that new records are only loaded when the user scrolls down. However, as people have been hinting at, your real solution is to redesign the page so that you don't need to show 3000 records.
|
|
|
|
 |
You are right at all. but our client requirement is very different. he needs all data on one page, he dont want to wait on scroll down of page(he didnt like ajax call data on scroll,i did it once.) I used jquery datatable for quick filter data on client side. but his browser gets stuck.then i moved changes to gridview. it looks better.but on filter ,it takes time. i need to make it fast. i read a solution in MVC , that it provides server side only.and reder all html on server. so i raised here the question.what should i do. whether jquery datatable for 3000 or more records will work fine on clients browser if i use mvc. :(
-- modified yesterday.
|
|
|
|
 |
Is this possible to generate PPT on server side and use it on client side without using inter-op property?? Thanks in Advance.
|
|
|
|
 |
You can use the Open XML SDK[^] for this.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
Hi all. Probably it should have been an article, but I want to start in an informal way.
Several months ago, I found myself with a thought I cannot deploy efficiently. But every single tool had its own disadvantages:
1. Atlassian bamboo can build, but can’t deploy well. It always was a Java thing. It can’t make sites, alter web.configs and work with MSSQL.
2. Teamcity is a great product from great company, but it is a CI server wich can make packages and nothing more.
3. Octopus deploy is pretty good thing at first sight but there is a huge mess with packet versions every time I had to decide what packet versions to use and of course it cannot build.
Therefore, I decided to try making my own tool, that can build, and therefore aware of project types, can deploy and aware how things work in ASP.NET.
So please welcome! http://aspnetdeploy.com/[^]
fully open source, hosted on GitHub (wip). Begging for feedback, what do you think of it? does it seem useful for you?
|
|
|
|
 |
This post should be in the Free Tools forum[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
I would of never looked there, does sound interesting however.
|
|
|
|
 |
Hi All,
I have a Radio button group control that I am using in my ASP.Net application, when it is rendered on the client machine, it is rendered as below with Id and name, can I get the client name of the control instead of getting the client id.
Here is how it is rendered.
<input id="phb_ynTransferAttend_rdbYes" type="radio" name="ctl01$phb$ynTransferAttend$phb_ynTransferAttend" value="rdbYes" checked="checked" class="req" required="required">
And I want to get the name value "ctl01$phb$ynTransferAttend$phb_ynTransferAttend" instead of its Id "phb_ynTransferAttend_rdbYes" in my C# code behind, can I do that please?
Any help link, suggestion or code snippet would be really helpful
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
 |
1. Why do you want the name?
2. You might be able to get it by referencing your control's attributes. FIrst add a runat="server" so you can access it directly in c#. Then possibly by phb_ynTransferAttend_rdbYes.Attributes["name"] might work.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
 |
For most controls, the name will be the same as the UniqueID property[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
this is code for voice recognition in vb.net c# how to make it run in asp.net c# please help
private void button1_Click(object sender, EventArgs e)
{
spengin.RecognizeAsync(RecognizeMode.Multiple);
}
private void spengin_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
switch (e.Result.Text)
{
case "hi":
MessageBox.Show("hi");
break;
case "print developer":
textBox1.Text += "developer";
break;
}
}
private void Form1_Load(object sender, EventArgs e)
{
Choices command = new Choices();
command.Add(new string[] { "hi", "print developer" });
GrammarBuilder gbuilder = new GrammarBuilder();
gbuilder.Append(command);
Grammar grammar = new Grammar(gbuilder);
spengin.LoadGrammarAsync(grammar);
spengin.SetInputToDefaultAudioDevice();
spengin.SpeechRecognized += spengin_SpeechRecognized;
}
|
|
|
|
 |
This code is in C# (Not VB.NET), they have different paradigm and syntax. This can be used in ASP.NET web application by creating an assembly (library; or simply class) inside your application and adding this code in to it.
ASP.NET is capable of running your VB.NET or C# code, because .NET framework is backing them all, VB.NET, C# and ASP.NET.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
 |
i tried doing with asp.net bt it didn't happen.. bt its working fine with vb.net
if u guys could try it on your system n tell me what m missing that will b a great help.
Assemblies used is "System.Speech.Recognition"
looking forward for your replies..
Thank you.
|
|
|
|
 |
You need a reference to "System.Speech"
|
|
|
|
 |
If this is ASP.NET, then your code will not work.
Code running on the server has no access to the microphone on the client. Unless your intention is to recognise your sys-admin's voice when he's sat in the server room swearing at the server, you're not going to get anywhere with this library.
There is an HTML speech API[^] which would be a better fit, but it only seems to be supported in Chrome[^] at the moment.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
Exactly. +5
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
 |
I have a simple VB.Net web app that gets a large table based on Form controls and I need it display the progress such as Doing 'Record# nnn'.
This method can be simulated with via clicking on a button the the form is initiated which is the instance that we need to access. lblMsg is a label on the form what I would like to update.
Public Function GetTable
Dim I as Integer
for I = 1 to 10
lblMsg.Text = "Doing Record# " & i
Sleep 1000
next
End Function
We are currently trying the below but when GetTable gets control lblMsg is nothing which means that the form is not initialed.
How can I get this to work?
$(document).ready(function () {
$("#btnTrial").click(function (e) {
e.preventDefault();
$("#btnTrial").attr('disabled', 'disabled');
var total = 5;
if (document.getElementById('<%=txtLoopRows.ClientID %>').value != "") {
var total = document.getElementById('<%=txtLoopRows.ClientID %>').value;
}
// comes here the first time
PageMethods.OperatePage(total, function (result) {
if (result) {
setTimeout($.updateProgressbar, 500);
}
});
});
});
<System.Web.Services.WebMethod(EnableSession:=True)> _
Public Shared Function OperatePage(total As Integer) As Object
Dim session As HttpSessionState = HttpContext.Current.Session
Dim totalParsed As Integer = 0
Integer.TryParse(total.ToString(), totalParsed)
_TotalLoop = totalParsed
System.Threading.ThreadPool.QueueUserWorkItem(AddressOf ThreadProc, session)
Return New With {.progress = 0}
End Function
<System.Web.Services.WebMethod(EnableSession:=True)> _
Public Shared Function ThreadProc(ByVal stateInfo As Object) Dim DefPage As New _Default
DefPage.GetTable(stateInfo)
stateInfo("TICK") = Nothing
End Function
Thanks
modified 24-Mar-15 11:18am.
|
|
|
|
 |
GetTable is being kicked off from a background thread, it has no request context so has no server-side controls to access. Even if it did, you can't "push" data to the client that way, your server code isn't running inside the browser, it can't make changes to properties on server-side controls and have those instantly translated into DOM updates in the client html.
Basically your architecture isn't going to work, you can't do what you're looking to do because it isn't compatible with how http works. You'll need a function on the client polling a method on the server via a timer, and have that method return the current state which you them show in the browser by updating the DOM from the javascript.
|
|
|
|
 |
Yea, so much for hiring somebody to do it.
So how can I get the lblMsg.text pushed to the web form so that the user can see the progress i.e. Doing Record# nnn???
|
|
|
|
 |
[WebMethod]
public static string GetProgress()
{
return DateTime.Now.Ticks.ToString();
}
<div id="progress">
</div>
<script type="text/javascript">
var t = window.setInterval(showProgress, 1000);
var p = $("#progress");
function showProgress()
{
$.ajax({
type: "POST",
url: "test.aspx/GetProgress",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
p.html('Progress: ' + data.d);
}
});
}
</script>
|
|
|
|
 |
Thanks
I need the actual count in the background server code which must use the web form to get paramenters, etc.
How does the above fit in with the existing code? Do I remove it? or is this is combination with it?
|
|
|
|
 |
It depends what your gettable method is doing. I suspect you're trying to push html to the client which asp.net doesn't really support, the page has to be made in one go then sent to the client in one go, you can't do it in chunks (you can look at disabling buffering though, it might work, Response.Buffer = false).
Chances are you're going to have to re-architect this and rather than generating the table in a background thread, have your javascript function keep calling a web method that returns the data 10 or 50 rows at a time then create the table html via javascript as each batch comes back. That way the page stays responsive and gradually loads. Doing it the other way and trying to write the table bit by bit might not work.
Google for retrieving data via ajax, and building a table via ajax, you should get sample code of both.
|
|
|
|
 |
I understand that normally you get a server request and one page goes out and that is what I was really hoping to get around somehow.
GetTable does just that. It gets a database table from a Web Service based on form controls and populates a grid. It also writes it to disk for potential downloads.
I was hoping that this technology to update the lblMsg status could be used in other programs for a bunch of similar things.
Putting in some java to keep requesting a chunk might work in this case but in our other programs it would not or at least not easily. In the other programs the code would be much more complex and could not be done in chunks since the processing id dependent upon what it did in the records prior.
My thought is that since there are push technologies out there i.e. Chats do not need a user to push a button to get what other people enter, same for streaming that there must be a way of doing the same in my simple case. I have read about keeping sessions opened, etc. but since I am not a web developer I have a hard time getting my head around it.
As an alternative I was thinking of changing the lblMsg.text to s variable lblMsg_text that perhaps the async methods could just use to populate the real lblMsg.txt via Java. Would there be a way for that to work. I would have to be an instantiated variable since multiple users could be using it.
modified 4 days ago.
|
|
|
|
 |
I don't how you came up with that code, and it sort of looks like your a windows programmer trying to write a web form.
In code block 1, not sure why your using sleep, you sort of want the code to run as fast as possible.
In code block 2, you have a weird mixture of JQuery and Javascript.
So I just figured out that you just want to show a progress image or something, or you just want to call the service and create a pause as if code is running or something.
To show a progress, you just make a modal overlay using div, and just show and hide it using the client script.
This is how client script via web service works,
Introduction to using jQuery with Web Services[^]
|
|
|
|