|
thank u so much man! it worked!
recently i lost my old projects files that i programmed before now i know nothing without it! lol
|
|
|
|
|
Your Welcome!
Parwej Ahamad
|
|
|
|
|
Hi....
I am working on modalpopup on master page and i am trying to call it from a content page.
On master page i hv used a modal popup on master page as--
<asp:modalpopupextender id="mpePattern" runat="server" okcontrolid="btnOkay" cancelcontrolid="btnCancel"
="" popupcontrolid="pnlPopup" targetcontrolid="hiddenTargetControlForModalPopup" backgroundcssclass="modal" behaviorid="programmaticModalPopupBehavior" popupdraghandlecontrolid="PopupHeader" drag="true" dropshadow="true">
The issue is that when i try to find out the id or make object of this modal popup in Javascript ..it says null..
i have tried $find('mpePattern').show() as well as
documen.getElementById('mpePattern') but nothing working out....please help...
Gourav Kaila
|
|
|
|
|
Because your Modal Popup control is inside the master page control. So first you have to find Masterpage control then Modal Popup control. OR just go to page view source see the actual rendered Madalpopup control id.
Parwej Ahamad
|
|
|
|
|
Hi Gourav,
If you want to open ModalPopupExtender from the content pages using javascript, Use BehaviourID in place of ID.
Like that
<asp:ModalPopupExtender ID="mpePattern" runat="server" OkControlID="btnOkay" CancelControlID="btnCancel"
PopupControlID="pnlPopup" TargetControlID="hiddenTargetControlForModalPopup"
BackgroundCssClass="modal" BehaviorID="programmaticModalPopupBehavior" PopupDragHandleControlID="PopupHeader" Drag="true" DropShadow="true">
Javascript call:
$find('programmaticModalPopupBehavior').show();
I hope it will work.
|
|
|
|
|
Hi,
When I tried to implement the code from this forum to display data in the excel from a webpage, I am getting weird results. I am wondering if you could direct me to correct the problem? I thank you for your help.
The code is :
HttpResponse response = HttpContext.Current.Response;
response.Clear();
response.Charset = "";
//MAKE THE CONTENT TYPE TO EXCEL FORMAT.
response.ContentType = "application/vnd.ms-excel";
response.AddHeader("Content-Disposition", "attachment;filename=\"" + filename + ".xls\"");
// CREATE A STRING WRITER.
using (StringWriter sw = new StringWriter())
{
using (HtmlTextWriter htw = new HtmlTextWriter(sw))
{
// INSTANTIATE A DATAGRID.
GridView dg = new GridView();
dg.DataSource = ds.Tables[0];
dg.DataBind();
dg.RenderControl(htw);
//STYLE TO FORMAT NUMBERS TO STRING.
string style1 = @" .textmode { mso-number-format:\@; } ";
response.Write(sw.ToString());
response.Write(style1);
//response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();
}
}
}
catch (Exception ex)
{
throw ex;
}
}
ds:is the dataset
and filename is the name of the filename.
However, the file contains data as below:
"
"
MonthYearUSERIDApplicationNumOfReturns"
"
08/2011userid12010"
"
08/2011userid22010"
"
08/2011userid32009"
"
08/2011userid42010"
"
"
.textmode { mso-number-format:\@; }
<title>
" Untitled Page"
I am wondering what wrong with my code. Any help is greatly appreciated. Thank you.
|
|
|
|
|
|
|
I am having an issue understanding how to send data back from my view to my controller. I want to filter the results of a query based on search criteria. So the view looks something like this:
@model IEnumerable<CloutWeb.Models.Observation>
<h2>@ViewBag.Title</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table>
<tr>
<th>
Claim
</th>
<th>
Location
</th>
<th>
Category
</th>
<th>
Defect
</th>
@foreach (var item in Model.Observations) {
var imageName = Path.Combine("/Content/", item.fileName);
<tr>
<td>
@Html.DisplayFor(modelItem => item.Claim.description)
</td>
<td>
@Html.ActionLink(item.Location.name, "Search", new { id = item.locationId, searchType = 1 })
</td>
<td>
@Html.ActionLink(item.Defect.Category.name, "Search", new { id = item.Defect.categoryId, searchType = 2 })
</td>
<td>
@Html.ActionLink(item.Defect.name, "Search", new { id = item.defectId, searchType = 3 })
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.id }) |
@Html.ActionLink("Details", "Details", new { id=item.id }) |
@Html.ActionLink("Delete", "Delete", new { id=item.id })
</td>
</tr>
}
</table>
My issue is that I want 4 dropdown lists at the top that can be used to filter the information below. Any help would be appreciated. I have read that a viewmodel should be used here, but I can't find a good example relevant to what I need. Neither the Music Store app or the Nerd Diner app has this particular kind of functionality. I read tons of posts on Stackoverflow, but was unable to gleen an answer. Also, not sure of the difference between html.dropdownlist and html.dropdownlistfor, if anyone could point me in the right direction I would be much obliged.
Cheers, --EA
|
|
|
|
|
I am trying to decide the best way to develop and add some new web forms to an existing C# asp.net 2010 webform application. Basically my new webpages need to be kept separate from the other developer since his new pages are due sooner than mine are. I am basically going to have the user select my pages from the 'main' selection menu.
I am, thinking of using one of the following options:
1. I am thinking of using a version of the general webforms solution file and add my code to it in a new aspx file. This way I will use the same master pages, site navigation, and user login credentials. Thus when my code is ready, i will add the new aspx file to the general webforms solution. Is this possbile? How would i accomplish this task? Would i setup a user control?
2. I would create the new webforms in a solution file separate from the general webforms solution file. I would not put the 'master' pages logic into my individual web forms. When I am finished, i will add by code to the general webforms solution file.
Note: I am in a small company and we use subversion as our version control software.
What mehtod would you use and do you have any recommendations that I should follow? Would you accomplish this task differently? if so, would you tell me how to accomplish this task in a different manner?
|
|
|
|
|
How to set focus to a item of the checkboxlist in asp.net..
Dinesh.S
|
|
|
|
|
|
In your form load complete(it's mean after all process has been done), you can set which checkbox that you want to focus.
For example:
Protected Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles LoadComplete
If (your condition) Then
chkExample.Focus()
ElseIf (your condition) Then
chkExample2.Focus()
End If
Good Luck..=)
|
|
|
|
|
i have frame.aspx page on which i have frame plus hidden feild.
from which am calling another page.
in that anothe page i want to access hidden feild control of frame.
Below is my design page of frame.aspx
<form id="formFrame" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td align="center" valign="top">
<iframe id="iFrame" name="MainFrame" runat="server" width="940px" height="785px" scrolling="no" frameborder="0" >
</iframe>
<asp:HiddenField ID="hdnCulture" runat="server"/>
</td>
</tr>
</table>
</form>
Below is my frame.aspx.cs code
iFrame.Attributes["src"] = "Default.aspx?ticker=" + sTicker "";
So i want to access hdnCulture control on default.aspx page.
how can i access :(
|
|
|
|
|
Hi,
I need to write a Db2 connection and Need to access physical file in iSeries by using asp.net.
Any url or code?
Guhananth.S
|
|
|
|
|
I have created a web app with 4 layers : Presentation - Business - Services - Data. I have Business.Entities project which is added to Business layer and have Employee class in it.
I also have DataAccess.Entities and Presentation.Entities and have added Employee.cs in there also. Now in project references I have added Presentation project reference in Business, Business project reference in DataAccess.
Is this approach correct?
My Question is, Should Employee.cs class be added to each project entities like I did above or should Employee.cs be added to only Business.Entities project and Business.Entities proj reference be added to all projects?
I got this question because the 2nd approach was used in a project I downloaded from internet.
Please help.
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
You should follow one basic principle : Do not write redundant code. i.e. If you add Employee.cs to all the projects it would simply be the copy paste. Any change in this class will force you to change it in all the projects.
My recommendation :
As you have mentioned, you have Business.Entity project, add all the entities including Employee.cs in this project only. And then this project be added as a reference to rest of the projects.
Hope this helps.
All the best.
I quit being afraid when my first venture failed and the sky didn't fall down.
|
|
|
|
|
Thanks Pravin. You pointed out not to write redundant code and that is excellent.
But I have a question here. When following layers, do we not have to add the reference of Business in DAL, Presentation in Business etc. so that the flow will be maintained.
If Business project is added as reference on all projects, would the layered architecture model not be affected?
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
I highly appreciate your response. You raised a very correct and genuine concern. You have two options.
Options 1:
Keep the business entity and business logic altogether different. In business entity you will have only public properties exposed. in simple terms it will act as a container for the data that flows through the layers. And business logic will have the core busines logic in it. Now, in this approach you only need to add the reference of Business entity in all the layers. Presentation, Business and DAL.
Options 2:
You will have no difference between Business logic and Entity. You can merge these two layers. i.e. Public properties and the business logic pertaining to that will be in the same class. Validation also goes in the same class. In this case you will have to add reference of this layer to both presentation and Data layer.
Both these approaches are used extensively in the Software Industry. However, second approach is much more extensively used, even it is used in MVC, MVP and MVVP architecture.
Hope this helps.
All the best.
I quit being afraid when my first venture failed and the sky didn't fall down.
|
|
|
|
|
Thank you so much.
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
My pleasure.......
I quit being afraid when my first venture failed and the sky didn't fall down.
|
|
|
|
|
how can i create user for new login form
kunal singh Rajput
|
|
|
|
|
I guess you can create it on your users table.
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
To create a user you can make a registration form for filling userid and password choosing by the user.
These values should be inserted in databse and can be used for further login.
|
|
|
|
|
This may help[^]
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|