|
You'll have to call a webservice passing in the values submitted. jQuery has an .ajax method which makes calling web services easy. See http://api.jquery.com/jQuery.ajax/[^]
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
As per me you can use Jquery Ajax post and check autentication from SQL Db
|
|
|
|
|
Thank you all for the help i'll use AJAX wit SQL DB
modified 7-Mar-22 21:01pm.
|
|
|
|
|
When i try to open the "Web.SiteMap file in My C# (Asp.net), its getting error as :
"Value does not fall within the expected range".
Due to this issue unable to change Web.SiteMap.
I've been scratching my head with no luck.
|
|
|
|
|
Deleted the .suo file found in the solution main directory and see if that helps.
|
|
|
|
|
|
Hi all,
[I am trying to bind a gridview from a table and updation records in another table]
Actually I have two sql tables, named mtblVehicle_Booking and mtblLog_Book. In both tables all columns are same but mtblLog_Book is having 2 more columns KM_Start and KM_End.
Actually I am binding the gridview from mtblVehicle_Booking table (which don't have KM_Start and KM_End columns). The other side I have given edit option in gridview, but when I need to edit this gridview , the colums KM_Start and KM_End should come in that gridview as editing form and after updating the gridview the updated information should be seen in the gridview.
How can I accomplish this.
you can take it as a Gridview bounded with one table but when it gets update this should be partially bounded with the other table with updated information and rest of the gridview should bounded with the first one.
Suppose if gridview is having 5 rows from table1 one and if I edit two rows for updation the table2 then the gridview should show these 2 rows from table2 and the rest rows from table1 which actually has bot been updated.
|
|
|
|
|
You may be able to intercept the update during either the datasource Update event or the GridView updateRow event.
|
|
|
|
|
1st I'm a beginner MVC developer!
At any rate I wanted to add Facebook login to my (personal) website and didn't want to use the build in authentication (why bother the user with one more very forgettable useless password?)
So I deleted all authorization code and I have an account controller which take the facebook id and check it against Facebook server and set up a Session property with relevant Facebook data
now when I add an [Auhorize] attribute on my method it doesn't work (normal)
I wonder how I could setup the user!
I have code which create an IPrincipal (from facebook info) and set it to the HttpContext.User but it's lost on next query.
I tried override myControl.Initialize(RequestConterxt) and setup the current user (as in request.HttpContext.User = ...)
But I got a stranger error when I do that (which involve none of my code!!!!!):
[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.Mvc.Controller.PossiblyLoadTempData() +52
System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +92
System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +161
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +92
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag, Int32 timeout) +97
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag) +53
System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +417
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +49
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState) +127
System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +161
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout) +92
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag, Int32 timeout) +97
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag) +53
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +373
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +88
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +50
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +301
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
To summarize how could I use the [Authorize] attribute with my facebook user info?
|
|
|
|
|
Hello,
I am working on an mvc site. I understand the concept of the Model, however we are forced to work with the existance of our main frame. The data comes back in the form of a parameter block (fixed structure defining each field and it's length). This transaction to the mainframe would occur outside the controller (obviously). So to move the data from the transaction to something the controller uses can either be done with it's own class (my company calls them entities) or to double purpose the model as the information from the mainframe would basicaly (with same additions) be the fields of the model. Hopefuly all that made sense.
So the question is: do I create entity class and transfer all the data(properties) into the model after every tranasction once the fields are returned to the controller or do I double purpose the model by using it as the entity as well with the understanding that these fields that aren't to be used in the view would show up because the model fields and entity fields are mingled together?
Any advise would be greatly appreciated...
Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
|
|
|
|
|
Hi,
I'm developing a multiple-city Visitor's system. I want to create a Login page with following details:
Username, Password, City & Gate_Name.
I need to know how should I proceed with creation of tables and then the code.
The City & Gate_Name should be nested. When a city is selected, then only the appropriate gate-name must be displayed in drop-down box below.
Initially, Username & Password must be checked.
If they do not match, an error message must be generated.
If they match, then the associated city & gate-name must be checked.
If they do not match, an error message must be generated.
If all the details match, then a Session by UserID must be created and the user must be redirected to the Home Page.
A user allotted a particular gate cannot Login from any other city or any other gate.
Please help me with this Login Issue.
Thanks.
|
|
|
|
|
You have all the requirements and workflow with you. What exactly is troubling/stopping you from implementing it?
For table structure:
MstUser
UserID UserName Password CityID GateID
MstCity
CityID CityName
MstGate
GateID GateName CityID
Now, start the implementation that is pretty straight forward.
|
|
|
|
|
This article shows how to use the login and membership APIs with custom user information.
Understanding and Implementing ASP.NET Custom Forms Authentication[^]
Although you will have to add fields for City & Gate_Name and custom logic to check it. But the overall philosophy and working will remain the same as it is in this article.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
|
|
|
|
|
hello,
I want to implement url rewriting with intelligencia.urlrewriter.problem is when clean URL Contains special characters such as % : * & and more.in this case I get a bad request,because the cleaned url does not contain ? sign. I work with .net 3.5 .
Is there a solution for this problem?
thanks friends
|
|
|
|
|
is there any solution for this problem?please help me.
|
|
|
|
|
Have you checked the documentation? Does the author have a website or a forum?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a content management system(a dynamic website).
I searched and don't find any solution...there isn't any solution for it?
|
|
|
|
|
Hi,
I am migrating my DB from a C++ Structure system to SQL. As an example, I take the 'Order Table'
The CPP struct for an Order comprises of a header, containing all sorts of usefull info, like who owns it, who donne it,how many items, followed by an array of 32 possible 'Order Items', each containing amongst others: a TimeStamp, A Quantity, a narrative, an amount, and a WhoDunneit, as wel as obscure CPP management information to avoid data clashes.
This goes together with carefully crafted rules about who can edit what. (Each user can only edit own items, but suitably empowered supervisory personell can edit all entries.)
The method that worked best was what we called the 'Pragmatic Upate' The Update that updates from the original datafirst, wins. All others fail, and get a view of the latest version. Does SQL act like this, or do i need tricks to implement this.
The table was stored in a file,as an array of structures of this kind.
I hope to re-write the new version in C# ,ASP.NET.
First Stumbling Block: how do I create my array of items in an SQL Database. (come to think of it, how do I create the 'Item' array element in the first place.)
Bram
Bram van Kampen
|
|
|
|
|
Yes, SQL can store the data you describe quite well.
Here are a few terms you may want to research:
1) Primary key
2) Foreign key
3) Transaction
Basically what you describe is a classic Master-detail relationship where the Order is the master and the Items are the details. You would define a primary key on the Order table which uniquely defines the order, then that primary key is used in the Items table as a foreign key (relating all of the Items back to the single Order).
When you do updates to the Order/Items, you will use a transaction which ensures that all of the updates across all of the records are performed consistently or not at all.
Hope this helps.
![Cool | :cool:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_cool.gif)
|
|
|
|
|
Hi,
I am saving the following html in a database the trying to display it to show the recent activities for my user. I am doing this because the recent activities might contain HREFs. The problem that my result is not showing properly. it's not aligned normal to left although I tried to add align='left' to the
what can i do?
here is the saved data in the text datatype field:
<div>Yahoo! Baby!.</div>
and I am displaying like this:
<asp:Table ID="Table1" runat="server" Width="100%" BorderWidth="1" BorderStyle="Solid">
<asp:TableRow>
<asp:TableCell HorizontalAlign="Left" BorderStyle="Solid" BorderWidth="1"><dx:ASPxLabel ID="lblDate" runat="server" Text='<%# Eval("event_log_date_time") %>'></dx:ASPxLabel></asp:TableCell>
<asp:TableCell HorizontalAlign="Left" BorderStyle="Solid" BorderWidth="1"><asp:Literal ID="Literal1" runat="server" Text='<%# Eval("event_log_title") %>'></asp:Literal></asp:TableCell>
</asp:TableRow>
</asp:Table>
and this is the result on the user's page:
http://www.jassimrahma.com/temp/align_problem.png[ ^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
You don't have to use asp.net objects for all your html needs
Just use html, and then the asp.net objects just for the data fields, this is just a basic example.
There are 2 ways to set dimensions and alignments on html, one is using html, width="600" and the other using css style="width: 600px;".
I prefer using straight CSS, but when creating html for emails, you should use both.
<table cellpadding="0" cellspacing="0" border="0" width="600" style="width: 600px;">
<tr>
<td style="width: 295px; text-align: left; padding-left: 5px;">Your Object</td>
<td style="width: 295px; text-align: left; padding-left: 5px;">Your Object</td>
</tr>
</table>
FYI:
If you use padding, you have to subtract the padding amount from the total width of the element, some browsers will add the 2 together.
|
|
|
|
|
In a asp.net page how do i give export to excel option using javascript .
|
|
|
|
|
|
Javascript will somehow have to kick off server side code. But, using jquery's .ajax call you can do this. It will depend on how you have things setup. JS could pass the name of a stored proc that gets executed. Or it passes the value from a hidden field. Somehow you have to tell it what to export.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
this is my code on webform1.aspx
<asp:gridview id="GridView1" runat="server" width="100%" skinid="GridView"
="" onsorting="GridView1_Sorting" ondatabound="GridView1_DataBound" onrowdatabound="GridView1_RowDataBound" autogeneratecolumns="false" onpageindexchanging="OnPaging" showheader="true" allowpaging="True" showheaderwhenempty="True" allowsorting="True" onrowcommand="GridView1_RowCommand" pagesize="20">
<columns>
<asp:templatefield itemstyle-horizontalalign="left" itemstyle-verticalalign="Top">
<HeaderTemplate>Action</HeaderTemplate>
<HeaderStyle />
<itemtemplate>
<asp:linkbutton id="lnkverify" runat="server" text="Verify" commandname="Application_verify" commandargument="<%#Eval("RequestId") %>">
<asp:linkbutton id="lnkreject" runat="server" text="Reject" commandname="Appication_reject" commandargument="<%#Eval("RequestId") %>">
on webform.aspx.cs
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
if (e.CommandName == "Application_verify")
{
int RequestId = Convert.ToInt32(e.CommandArgument);
Response.Redirect("~/ApplicationDetails.aspx?RequestId=" + RequestId);
}
if (e.CommandName == "Appication_reject")
{
int RequestId = Convert.ToInt32(e.CommandArgument);
}
}
catch (ApplicationException ex)
{
lblsuccess.Visible = true;
lblsuccess.Text = ex.Message;
}
catch (Exception ex)
{
StackTrace st = new StackTrace(new StackFrame(true));
StackFrame sf = st.GetFrame(0);
int line = sf.GetFileLineNumber() - 1;
if (ex.Message.StartsWith("Thread") == false) { Response.Redirect("~/HandleError.aspx?ID=" + ex.Message, false); }
}
}
on Applicationdetails.aspx page i have a button control.on this button click event ,i want to change linkbutton's(this linkbutton is on webform1.aspx) text from "verify" to "verified".pls help me
|
|
|
|
|