hi to all of you,
problem is , that whenever the grid's row is right clicked the selected item is null.how do i make a the grid's row selected when any row was right clicked?
thanks
Jamal
i m trying to export data from asp.net form to excel using following lines of code
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("content-disposition", "attachment; filename=Report.xls");
Everything seems to be working fine.
Now what I need it to take some action if user clicks the "Cancel" button on File Download dialog. How i can do this ?
thanks..
Hi Everyone
i m developing a website using .NET 3.5 with MVC 2.0. For server side validations i m using ComponentModel.DataAnnotations. these validations are reflected to client side by html helper's method Html.EnableClientValidation(). this scheme works fine for except that it triggers the validation on blur event of each form control whereas i want to have it triggered on form's submit event. any suggestions in this regard are highly appreciated
regards
Hi Everyone,
i m developing an application in .NET mvc2. i m using aspnetMembershipProvider for User registration and related activities. i need some custom information about user that i stored in a separate table (sysUser for example) and linked it to aspnetUser table through foreign key. after Login i need to fetch user's credentials from sysUser table and push it to the session. For this Account controller's Logon method seemed best to me and i pasted following code in my Logon ActionResult
if (!ValidateLogOn(userName, password))
{
return View();
}
FormsAuth.SignIn(userName, rememberMe);
ApplicationRepository _ApplicationRepository = new ApplicationRepository();
MembershipUser aspUser = Membership.GetUser(userName);
SessionUser CurrentUser = _ApplicationRepository.GetUserCredentials(aspUser.ProviderUserKey.ToString());
//Session["CurrentUser"] = CurrentUser;
if (!String.IsNullOrEmpty(returnUrl))
{
return Redirect(returnUrl);
}
else
{
return RedirectToAction("Index", "Home");
}
The code is working perfectly for me and put my desired information in the session but the thing is that if a user selects Remember me and on his next visit he won't have to Log in and i would not find my desired information in the Session. Can anyone guide me where should i put my code that stores the user information in the session.
any Help is Highly appreciated
Regards
Adeel
i was wondering that how to load a single symbol from a swf file contatining many symbols.
we can use this symbol in CSS but my point is how we can display it on canvas ? as SWFLoader loads the whole SWF but i need.. only one symbol.
I want to know that how can I persist the divs dropped on a draggable. I have been trying since long but stuck at this point. Actually you can see the demo here. I have to save the user designed wedding floor. So whenever user logins next time he/ she is able to see the last design saved. The code is shown below:
$(document).ready(function() {
$("#droppable").droppable({
accept: '.draggable',
drop: function(event, ui) {
$(this).append($(ui.draggable).clone());
$("#droppable .draggable").addClass("objects");
$(".objects").removeClass("ui-draggable draggable");
$(".objects").draggable({
containment: 'parent',
});
}
});
$(".draggable").draggable({
helper: 'clone',
tolerance: 'touch',
cursor:'move'
});
});
Hi,
I have two links & I want to show / hide them one at a time, my code is :
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
// we will add our javascript code here
$(document).ready(function() {
$(function(){
$('#link').click(function(){
$('#colorDiv').slideToggle('slow');
return false;
});
});
});
</script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
#dv {
width:100px;
height:100px;
border:1px solid;
}
</style>
</head>
<body>
<table cellspacing="2">
<tr><td><a href="#" id="link">Color</a></td><td><a href="#" id="link">Car</a></td></tr>
<tr><td><div id="colorDiv">Red</div></td><td><div id="carDiv">PRADO</div></td></tr>
</table>
</body>
</html>
by default first div should me shown.
hanks.
I have a DTV-DVB Mantis BDA satellite card and I was wondering if i can use it programmatically to request a satellite transponder list throw some library or if i should create one Where should i start?
I saw applications do that such as ProgDVB, but i didn't know what is the idea behind that.
Another question: is there any standard that define how to communicate with Satellite TV, and if there is where i can get/read it.
thank you
Hi,
I am creating Hang a Man using PHP, MySQL & Javascript. Every thing is going perfect, I get a word randomly from DB show it as a label apply it a class where display = none. Now when I click on a Character that character become disable fine which i actually want but the label-character does not show.
My code is:
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<?php
include( 'config.php' );
$question = questions(); // Get question.
$alpha = alphabats(); // Get alphabets.
?>
<script language="javascript">
function clickMe( name ){
var question = '<?php echo $question; ?>';
var questionLen = <?php echo strlen($question); ?>;
for ( var i = 0; i < questionLen; i++ ){
if ( question[i] == name ){
var link = document.getElementById( name );
link.style.display = 'none';
var label = document.getElementById( 'questionLabel' + i );
label.style.display = 'none';
}
}
}
</script>
<div>
<table align="center" style="border:solid 1px">
<tr>
<?php
for ( $i = 0; $i < 26; $i++ ) {
echo "<td><a href='#' id=$alpha[$i] name=$alpha[$i] onclick=clickMe('$alpha[$i]');>". $alpha[$i] ."</a> </td>";
}
?>
</tr>
</table>
<br/>
<table align="center" style="border:solid 1px">
<tr>
<?php
for ( $i = 0; $i < strlen($question); $i++ ) {
echo "<td class='question'><label id=questionLabel$i >". $question[$i] ."</label></td>";
}
?>
</tr>
</table>
</div>
i have XMLList data which is used for advanceddatagird dataprovide(by converting it to hierarchal data ), the advanceddatagrid consist of 2 columns,i want to access the ItemRenderer of 2nd colomn (customized item rendrer) by giving the item.
i can get the itemRendrer bu using
var Obj:Object = itemToItemRenderer(item);
i cant understand that obj is IListItemRendrer, but in 2nd colomn i have used the renderer named "ProcessFLowRendrer"? can you tell me how i can access the rendrer of 2nd column, by item not by index ?
Hello I want to get user from an email address,
eg: [email protected] then output must be sajid
for this is use below mentioned code but an warning occur
$user = strstr($email, '@', true);
Warning: Wrong parameter count for strstr() in /var/www/DataTable/dialog.php on line 3
& in php manul it is clearly define that the 3rd argument true is only valid for PHP 5.3.0
So is there any string function which could solve my problem?
hi,
here is my case , i want to assign roles to my employees. All Roles are need to be sent to the constructor of the employee class when a user clicks + sign on the top of dataform(Silverlight toolkit 2009).
if i put a break point on the default constructor , it gets hit. so i just want the dataform to send this collection when ever it creates new employee.
thanks
Jamal.
Hello.
I want to fetch all my emails available in different online accounts eg:(gmail, yahoo, hotmail, aol, etc..) using PHP such that if necessary to reply any email then I could reply.
How it is possible?
hi ,
i want to implement a web service which is both in java and .net.but i will first create a wcf service and later convert the code to java .
for securing the webservice , i have this in my mind.
i shall be implementing asp.net form authentication type of stuff . i intent to sent a token to the client on providing valid userID and password to the login method. in return i would send a token.
on all other service operations i shall check the token .
Now i have a wcf client and a wcf service . what should be the shortest way forward ?should i use soap auth header to send the user ID and password and how should the token be transported ( in which field ? http or soap's ?) .
P.S: of course i shall enable ssl later.
Please see following methods.
public static ProductsCollection GetDummyData(int? customerId, int? supplierId)
{
try
{
if (customerId != null && customerId > 0)
{
Filter.Add(Customres.CustomerId == customerId);
}
if (supplierId != null && supplierId > 0)
{
Filter.Add(Suppliers.SupplierId == supplierId);
}
ProductsCollection products = new ProductsCollection();
products.FetchData(Filter);
return products;
}
catch
{
throw;
}
}
public static ProductsCollection GetDummyData(int? customerId)
{
return ProductsCollection GetDummyData(customerId, (int?)null);
}
public static ProductsCollection GetDummyData()
{
return ProductsCollection GetDummyData((int?)null);
}
1- Please advice how can I make overloads for both CustomerId and SupplierId because only one overload can be created with GetDummyData(int? ). Should I add another argument to mention that first argument is CustomerId or SupplierId for example GetDummyData(int?, string). OR should I use enum as 2nd argument and mention that first argument is CustoemId or SupplierId.
2- Is this condition is correct or just checking 0 is sufficient - if (customerId != null && customerId 0)
3- Using Try/catch like this is correct?
4- Passing (int?)null is correct or any other better approach.
Edit:
I have found some other posts like this and because I have no knowledge of Generics that is why I am facing this problem. Am I right? Following is the post.
http://stackoverflow.com/questions/422625/overloaded-method-calling-overloaded-method
I have hidden field on thick box, when I close thick I need to get the value of my hidden field, when close thick box this method calls
function tb_remove(parent_func_callback) {
parent.document.getElementById('hdf').value// I need value of hidden field here
please tell me how can I get hidden field value that is on thick box?
Thanks
Hi All!
i am facing a problem with UIwebview in landscape mode.
in landscape mode the touche event works only 320x320. its not working on entire screen in UIwebview!
How can we embed the over,up,down etc skins defined as sybols in a .swf file... i mean in skin file how can i specify those symbols to be used as up,over,down skins.
Hi,
I am a beginner to asp.net. I want to sort a gridview but the problem i m facing is when sort event handler is called the exception of stack over flow is thrown. Following is my code for sorting function.
protected void sortGridView(string strSortExpression)
{
if (strSortExpression != string.Empty)
{
if (ViewState["sortOrder"] == "desc")
{
dgvBookInfo.Sort(strSortExpression, SortDirection.Ascending); //string.Format("{0}{1}", );
}
else
{
dgvBookInfo.Sort(strSortExpression, SortDirection.Descending);
}
}
}
Thanks
What are the things to take care, when developing pages to support browser compatibility?
What I mean is, layout is not properly shown in all browser as required, but working fine in some browser.
I am executing SQL in hibernate and getting exception Return types of SQL query were not specified
public ArrayList get(string Release, int DocId)
{
string query = string.Format("select ti.Id, (' Defect ' + cast(ti.onTimeId as varchar) + ' - ' + ti.Name) as Name from TrackingItems ti inner join DocumentTrackingItems dti on ti.Id = dti.ItemStepId inner join Documents doc on dti.DocumentId = doc.Id where ti.ReleaseId = '{0}' AND doc.TypeId = {1} and Doc.Name is null AND ti.Type = 'Defect'", Release, DocId);
ISession session = NHibernateHelper.GetCurrentSession();
ArrayList arList = (ArrayList)session.CreateSQLQuery(query).List();
return arList;
}
When I run this query in SQL, it working fine.
any idea what could be the issue? --------
Thanks.........
Hello Everyone,
i have following two routes registered in my global.asax file
routes.MapRoute(
"strict",
"{controller}.mvc/{docid}/{action}/{id}",
new { action = "Index", id = "", docid = "" },
new { docid = @"\d+"}
);
routes.MapRoute(
"default",
"{controller}.mvc/{action}/{id}",
new { action = "Index", id = "" },
new { docConstraint = new DocumentConstraint() }
);
and i have a static "dashboard" link in my tabstrip and some other links that are constructed from values in db here is the code
<ul id="globalnav" class = "t-reset t-tabstrip-items">
<li class="bar" id = "dashboard">
<%=Html.ActionLink("dash.board", "Index", pck.Controller, new{docid =string.Empty,id = pck.PkgID }, new { @class = "here" })%>
</li>
<%
foreach (var md in pck.sysModules)
{
%>
<li class="<%=liClass%>">
<%=Html.ActionLink(md.ModuleName, md.ActionName, pck.Controller, new { docid = md.DocumentID}, new { @class = cls })%>
</li>
<%
}
%>
</ul>
Now my launching address is localhost/oa.mvc/index/11 clearly matching the 2nd route. but when i visit any page that has mapped to first route and then come back to dash.board link it shows me localhost/oa.mvc/7/index/11 where 7 is docid and picked from previous Url. now i understand that my action method is after docid and changing it would not clear the docid. my question here is that can i remove docid in this scenario without changing the route.
regards
adeel