|
It's fairly self-explanatory. You need to supply the procedure with a parameter. Exactly how you do this depends on how you are calling the code, which we don't know as you didn't paste your code.
|
|
|
|
|
The error should be clear. However, what happens sometimes is someone has code like this:
cmd.Parameters.AddWithValue("@name", name);
and if the name variable is null you'll get that error. If name is null then you need to supply DBNull.Value instead.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi try following
1 check name in procedure and in code behind should be same
2 or check procedure name
i think it is typo error
|
|
|
|
|
my web page in table is create but update and delete functionality is not worked.......to plz help me
my html table
<div class="outer">
<div class="inner">
<div class="page-header"><!-- Page header -->
<h5><i class="font-home"></i>Data Display</h5>
<ul class="icons">
<li><a href="#" class="hovertip" title="My tasks"><i class="font-tasks"></i></a></li>
<li><a href="#" class="hovertip" title="Reload data"><i class="font-refresh"></i></a></li>
<li><a href="#" class="hovertip" title="Settings"><i class="font-cog"></i></a></li>
</ul>
</div><!-- /page header -->
<div class="body" >
<div class="block well">
<div class="table-overflow">
<table class="table table-striped" id="data-table">
<thead>
<tr>
<th>Id</th>
<th>State Name</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
asp.net code
public void DataLoad()
{
DataSet ds = obj.gd("select * from state where adminid='" + Session["idd"] + "'");
for (int i = 0; i < ds.Tables[0].Rows.Count;i++ )
{
htmlTable.Append("<tr>");
htmlTable.Append("<td>" + ds.Tables[0].Rows[i]["id"] + "</td>");
htmlTable.Append("<td>" + ds.Tables[0].Rows[i]["state"] + "</td>");
htmlTable.Append("<td>" + "<a href='#'> <i class='icon-pencil' /> </i></a>" + "</td>");
htmlTable.Append("<td>" + "<a href='#'> <i class='icon-remove' /> </i></a>" + "</td>");
htmlTable.Append("</tr>");
}
PlaceHolder1.Controls.Add(new Literal { Text = htmlTable.ToString() });
}
|
|
|
|
|
use jquery
Help people,so poeple can help you.
|
|
|
|
|
Hi Developers,
Hope everybody doing well ..
I'm trying to work with ASP.net membership also integrated with my APP,
first I've created a sample web app to create the new users to membership table
I've Added the membership tag to web.config and change the connection string to my Database connString also I set ApplicationName to "\".
then I added "CreateUserWizard" control with the following code:
Membership.CreateUser(CreateUserWizard1.UserName,CreateUserWizard1.Password,CreateUserWizard1.Email);
But when I run the code, I have the following exception :
http://www.m5zn.com/newuploads/2015/03/21/jpg//9a5f11556559e6b.jpg[^]
Anyone help please
|
|
|
|
|
The column it's referring to isn't referenced in the line of code you provided. May need more code in order to help. Something is referencing the ApplicationName column, and it doesn't exist in the database.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
I want to display the name of the user that is currently logged on in the system.
PS:- Using VS-2013, ASP.NET and I am freshers so please be specific Don't have much idea about authorization, identity or authentication.
Thank You
|
|
|
|
|
Then the better thing would be to first go and learn ASP.NET's authentication modules, or the framework being used. You might be using Identity; or a WebSecurity -based method of authentication which can be answered by the way you create your application -- as a new project or a new website.
If that is the WebSecurity [^]-based application (a website), then you can do that like this,
var username = WebSecurity.CurrentUserName;
Or you can get the UserId of the user and query the database to get the Name.
Otherwise, if you're using Identity[^], then you would have to query the database anyway; Entity Framework has got you covered!
You can get the values from the database as,
db.Users.FirstOrDefault(x => x.Id == someUserId);
You can then move on and learn other basics about ASP.NET from MSDN, or the best option. Test, try and solve method!
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 attended an Interview last sunday. One of my interview question is,
"Why the validation in Update Panel is not working properly in Asp.net? And what is the reason?"
I tried some reference article in Google but not yet cleared due to some language problem. Can anyone tell me the reason? or please provide some source to clear my question.
Hope my question is clear as well.Dunno where should i post this? If my question is not here in a right forum, please guide me to correct session.
Regards,
Rajeshwaran
~R@JEES#
|
|
|
|
|
Given the detail you've supplied the only answer I could give is "Because it hasn't been coded properly".
|
|
|
|
|
Yes i too have the same answer. But, little bit confusion when he asked this question to me. Because having less knowledge about Validation in Update panel. He asked me why it's not working properly? there i struck.
~R@JEES#
|
|
|
|
|
How to check that textbox data entered by the user exist on the db(MS Access) or not and if it exist in db than on the basis of that fetch the data and display on gridview else show error msg on label.
Note:- Using VS-2013 Asp.net webform with c#
|
|
|
|
|
It is a pretty simple task, just get the data from your TextBox, search the database and if there is a record then show the data. Ok, let me talk to you in C#.
var val = textBox1.Text;
if(hasRows) {
} else {
}
You can then execute the function based on the data that was returned from the database.
SqlDataReader on MSDN[^].
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Build a "select" query that returns the data you're interested in, or define a query in the Access DB that does the select and call the query. If you get any rows back bind them to the gridview, otherwise show an error label.
Is there something in particular you are stuck on? Is it reading user input? Using queries? Using the gridview? Conditionally showing messages?
|
|
|
|
|
If your really good at this, you use JQuery client side programming, and either bind a blur event to the textbox, or create a textbox with a blur event that links to a JQuery Function.
Then write a JQuery Ajax request to a web service, in which the web service returns the data you need, and do something with the result.
In the web service, you perform all your server side programming, but it happens in the background without a postback to the server, keeping the web app smooth in motion and fast in speed.
Introduction to using jQuery with Web Services[^]
Other wise, you have to postback the textbox data to the server, and fetch new stuff and repopulate the HTML or form (Gridview)
When developing on a local machine, folks forget about speed, and long it takes. So consider form design for this,
Is this an optimum time to check the data entered, and force the user to wait 10 seconds or so?
|
|
|
|
|
Could you Please Answer my interview Question::
1. Interface main Use for real time and opps concepts? Its only have signature. So why in need Interface & apstract class??? Some people say we use these for Large amount of class to handle easily? But why should i need this?
2. What is route Collection action if we declare Default 1 Default 2
3. you have 2 record website traffic. The table contain we site name (Multiple website). Page Name IP Address and UTC datetime. What would be the Query to show all websites visited in the last 30 days with total number or visits if unique page view and total number of unique visitors (Using IP Address)
4.You have 3 fields ID Date and Total Your table contains multiple rows for the same day which is valid data however for reporting purpose you need to show only one row per day. The row with the highest ID Per day should be returned the rest should be hidden from users( not returned)
5. find the smallest sub-string in s1 containing all characters of s2
Ans : s2.substring(s1) is correct????
6.How to handle Temp Table in sql?
7. How to update Male to Female and Female to male in Single SQL Updating Query.
8.How to stored User Viewed URL in sql from MVC
Thank you For advantage ...,
|
|
|
|
|
It is inappropriate to ask us volunteers to answer in detail all 8 questions. Perhaps if you had a single specific question we would gladly help. #6 doesn't even make any sense, by the way. The rest of the questions seem incomplete as well.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
i use jquery for infinite scroll. i just invoke my page method by jquery and page method return data in json format which jquery parse and jquery push those data into div and append that div in page. when user scroll to end of the page then loading data. so this way user scroll and scroll to read data and jquery just append the div in the page again and again which make heavy the pages and this cause my page slow and some time crash.
so guide me how to develop infinite scroll as a result my page would not be slow and crash?
i guess if i could remove div from my page when it goes out of viewport but if user again scroll upward then again i need to load that data and append in the page. this logic is getting tough for me to design whole things. so anyone can help with code sample to implement this or redirect to me any code sample or write up which help me to do this.
looking for guidance. thanks
tbhattacharjee
|
|
|
|
|
It's a limitation of the client's browser and how much memory it can have. Even though code can support infinite scroll no user should expect it to continue scrolling forever and ever without using up more memory.
I suggest put a limit on the infinite scroll and then have the user page if they want more.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
to solve this problem the way is for virtual scrolling. when user scroll down then new records will be append at the end of page and old records at the bof will be deleted those goes out of scope or view port.
please share a link if you know any jquery plugin for virtual scrolling.i need idea like how to implement this with jquery.
tbhattacharjee
|
|
|
|
|
Hello masters,
i'm not familiar with asp net and database. i have project to about asp and database and i try to use ASP Net and database from my sql to show markers at google maps. But my problem is that it displays the markers, but does not display the polylines. I dont know source code to create the polyline. Can you help me to show you source code? thanks before.
|
|
|
|
|
Hi All,
I am trying to reload parent page from a popup, after closing the popup, I am trying to reload the parent page and it is going into parent pages load method and loading everything, but showing the old value on the label. It seems it is executing parent reload before code behind. Can anybody please help me in this? Here is the code that I am calling in save click on client side, then it is calling the parent reload after that it is saving it seems? How can I change it to execute the the code behind click even first and then executing the reload?
if ((RedirectUrl != null) && (RedirectUrl != undefined) && RedirectUrl) {
if (NewRole && (NewRole == "N")) {
alert(NewRole);
parent.location.href = RedirectUrl;
parent.location.reload();
}
}
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I could able to figure out the answer may be some body can use it that's why I am posting the answer here.
Put this code in the aspx file in script tag.
<script>
var RedirectUrl = '<%=RedirectUrl%>';
var HeadStart = '<%=HeadStart%>';
var NewRole = '<%=NewRole%>';
var GranteeId = '<%=GranteeId%>';
var RoleTypeId = '<%=RoleTypeId%>';
function RefreshParentWindow() {
if ((HeadStart != null) && (HeadStart != undefined) && HeadStart && (HeadStart == "Y")) {
if ((RedirectUrl != null) && (RedirectUrl != undefined) && RedirectUrl) {
if (NewRole && (NewRole == "N")) {
parent.location.href = RedirectUrl;
parent.location.reload();
}
}
}
}
</script>
And then call the above function in the code behind in button click after successfully saving the data.
void btnSave_Click(object sender, EventArgs e)
{
using (StaffBusinessObject staffBO = new StaffBusinessObject(UserId, CurrentDate))
{
bool temp = Save(staffBO, true);
if (temp && HeadStart == "Y" && NewRole == "Y")
{
Response.Redirect(RedirectUrl);
}
else if (temp && HeadStart == "Y" && NewRole == "N")
{
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "script", "<script type='text/javascript'>RefreshParentWindow()();</script>", false);
}
}
}
Now enjoy coding
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
modified 18-Mar-15 18:45pm.
|
|
|
|
|
How to export gridview data to ODS file?
|
|
|
|