|
Thanks,
I have three input boxs, userid, username and password, and a submit button.
The user will enter userid in the input box, then I want to invoke the onblur="check()"
event to check the userid entered with a value in the database and if it exist I will
fill the username.
My problem is the whole layout of Ajax, how I'm supposed to implement it, creating a '.js' file that will in the background
call default.aspx to connect to the database. default.aspx will ofcourse use default.aspx.cs
to connect to the database.
Does this help you see what I am trying to do?
|
|
|
|
|
You need to start here[^] I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You could use ASP.NET AJAX for this, the easy way would be to use the UpdatePanel, the not so easy way would be to call a WebService or PageMethod to get the data and the use JavaScript and the DOM to show the new data to the user, as I said the WebService way is not as easy but is much faster and will give you better performance than the UpdatePanel, check this link[^] for samples and tutorials on WebServices, here’s[^] the ASP.NET AJAX site.
|
|
|
|
|
Hi All,
I'm creating a web application in ASP.NET and c#. What I'm trying to do is create a vertical menu similar to the blue one in this link:
http://www.alistapart.com/articles/taminglists/
I've created these menus in the past but in just a plain HTML page not ASP.NET. When I try to apply the same format to the unorder list the look isn't the same so I was trying to create it using LinkButtons like so:
<span class="subMenuDiv">
<asp:LinkButton ID="link1" runat="server" CssClass="subMenu" Text="Case Info"></asp:LinkButton>
<asp:LinkButton ID="link2" runat="server" CssClass="subMenu" Text="Reportable Info"></asp:LinkButton>
</span>
The CSS looks like this:
.subMenuDiv {
float: right;
width: 120px;
padding: 0 0 0 0;
border: none;
margin: 0;}
.subMenu {
width: 100%;
margin: 0;
padding: 4px 10px 4px 10px;
text-decoration: none;
background-color: #CCCC99;
border: solid 1px black;
color: #666633;
text-align: left;}
The problem I'm having is the border of the subMenu is showing up twice, i'm not sure why but I know the padding is linked to it.
How do I get it so the border only shows on the outer edge of the linkButtons (subMenu items) and so only one border is shown?
Any help would be great.
Thanks
|
|
|
|
|
Do not repost the same question to multiple forums. You have asked this yesterday in the .net framework forum. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Sorry for the report, I forgot about the ASP.NET message board and posted in the .NET instead.
I'd like to remove it from the .NET message board if possible.
Thanks
|
|
|
|
|
http://www.codeproject.com/Messages/1278599/How-to-get-an-answer-to-your-question.aspx[^]
6. 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. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
haved looking ,thank you very manch.
|
|
|
|
|
How to store DateTime in database am using following code.
-- Modified Thursday, March 18, 2010 9:01 AM
|
|
|
|
|
One, please follow the rules of these forums and format the code you post using the pre tags.
You are not passing a date to the insertdate method in your button handler I know the language. I've read a book. - _Madmatt
|
|
|
|
|
where is the code in this message?
|
|
|
|
|
|
Hi,
i have one multi line text box and one save button..
When a SAVE button is pressed it will perform a action on the
database either to add data that a user has entered.
When the refresh button is pressed at the top of the page the same
exact data is re-submitted again resulting duplicate transaction in the
database. Is there anyway of stopping this happening? From client-side
script or server side , how can we detect that the "Refresh" button is click?
|
|
|
|
|
The most likely cause of this scenario is not handling Page.IsPostBack properly. Where is the logic for the save button? I know the language. I've read a book. - _Madmatt
|
|
|
|
|
after iam saving data in to database..
when we click on page refresh button ,its again stored in database..
|
|
|
|
|
Yes, you explained that in the first post.
Where is the logic for save action? Are you checking IsPostBack? I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
You are not getting it. You are obviously not handling it properly or it would not be happening. Show what you have done so we may be able to point out your mistake. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
IsPostBack can't tell the difference between clicking a button and clicking refresh since refresh posts all the same stuff to the server as the previous POST from the button click.
|
|
|
|
|
Yes, however the OP stated they were clicking a refresh button. It should be easily handled in the button click events unless the logic for the submit action is being done in the page load event. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You don't get a click event for the IE browser refresh button.
|
|
|
|
|
You do with a button. The OP said they clicking a refresh button. I assumed another button on the page, not the browser refresh
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The one solution I can think of is after saving information in database, redirect the page to another page, which, in turns redirects back to the previous page...
I mean, you can do this:
1. Save data in database
2. Redirect to another page, say temp.aspx
3. On temp.aspx, write code to redirect back to the previous page
In this way, after saving the information user will always get a new instance of the same page. Being a new page, hitting refresh button will not again post back the page.
|
|
|
|
|
When you know for sure that the users are bound to click the browser's refresh button to refresh the screen, why not put a refresh button on screen along side the data that they expect to be updated and perform a refresh of just that data?
That was just a suggestion to improve your application. Now to the solution to your problem.
Once the save is completed, just register a client script that would make a fresh request for the page. You can do so by calling window.location.reload() or window.location.url='PageName.aspx';
This would refresh the page and the next time Refresh/F5 is hit only page load is posted not the button click.
NOTE: Register either of these scripts from the server after the button click, don't directly add it on the existing javascript blocks.
HTH!!!
|
|
|
|
|
This is the best approach. I do agree with you Dinesh.
There is no foolish question, there is no final answer...
|
|
|
|