|
I think it's running the page validator script now, you'll have to see if the script runs to the end and get to Dim manager = new UserManager(), put a breakpoint there
|
|
|
|
|
It looks to me as if it has stopped. In the very bottom left of the software it says 'Ready'. Everything has stopped in modernizr. It has stopped here at the very top of modernizr:
window.Modernizr = (function( window, document, undefined ) {
and has a red spot next to it with a yellow arrow inside it, and the Immediate Window is blank.
|
|
|
|
|
Hi everyone.
I am well and truly stuck.
I have created a huge list of radio buttons on my razor view. Each row is a different set of radio buttons and I have given them each dynamic names.
I am new to MVC and i did not know how i can pass this radio button list to controller
this is my editor template
@model StudentManagement1.TeacherCourseStudent
@{
ViewBag.Title = "Attendance";
}
<tr>
<td>
@Model.Student_Id
</td>
<td>
@Model.Student.Name
</td>
<td>
@Model.Student.Sur_Name
</td>
<td>
@Model.Student.Semester.Semester_Name
</td>
<td>
@Html.RadioButton(@Model.Student_Id.ToString(), "present", true)
</td>
<td>
@Html.RadioButton(@Model.Student_Id.ToString(), "absent")
</td>
<td>
@Html.RadioButton(@Model.Student_Id.ToString(), "leave")
</td>
and this is my view
@model IEnumerable<StudentManagement1.TeacherCourseStudent>
@{
ViewBag.Title = "MarkAttendance";
Layout = "~/Views/Shared/_TeacherLayout.cshtml";
}
@using (Html.BeginForm("MarkAttendance", "Attendance", FormMethod.Post))
{
<table>
<tr>
<th>
Student Id
</th>
<th>
Name
</th>
<th>
Sur Name
</th>
<th>
Semester
</th>
<th>
Present
</th>
<th>
Absent
</th>
<th>
Leave
</th>
</tbody>
@Html.EditorForModel()
</table>
<br /> <br />
<input type="submit" value="Save attendance" />
}
here my controller to which i want to pass values
[HttpPost]
public ActionResult MarkAttendance(IEnumerable<string> Student_Id)
{
return view();
}
MVC
|
|
|
|
|
Hi,
I am designing a website. The designing is almost complete.
But I am noticing that there is many images and file is unlinked and in useful.
It is unnecessary present in the project. I would like to remove/delete it. But
it almost impossible to detect these types of files manually, impossible. So is there any way
to find these files ? Please help me.
|
|
|
|
|
I don't know of any tools to do it other than just manual. I suppose you could search google but since files can be referenced so many different ways, I doubt there is a tool that will work completely.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
That's where the expertise of the web designer comes into play.
I use a folder system for images, various folders that store different images, so it can be contained on a smaller scale.
for example
/images/cnc - contains all the theme and construction parts of the design.
/images/icons - contains all the small pieces of artwork
/images/adPanes - contains all the ad's
Many times, we place a image folder in the content folder, and when the content expires, we delete the whole folder.
/SpecialContent
/SpecialContent/images/image.jpg
/SpecialContent/scripts/js.js
/SpecialContent/index.html
It would be quite a task to organize your files and correct the links for them.
On the flip side, we don't delete many images, unless its a new project, in which we dump unused images before deployment.
|
|
|
|
|
Hello
I have a Project that Use Very Div Element And Onblur Event In its.
Because Of Security Reason We Switch From a version of JQuery To another .
But We Face With This Problem :
onblur Event dont Fire In Div Element
But it Fire in input elements Like Textbox!!!!!
and also onfocusout Event Fire in dive
but i dont want use this.
<div onblur="alert('dosent work this Event!!!!!')">
any help To solve this Problem can be useful
thanks in advance
|
|
|
|
|
Literally the first result on Google for "html div onblur":
For blur event to fire on an element, the element needs to receive focus first. But <div> elements do not receive focus by default.
You can add tabindex="0" or contentEditable to your div so it will receive focus.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
ok but focusout event fire without set tabIndex=0 to div element , and this means that div has focus in this scenario!!!!
i set "tabIndex=0" to div element for fire onblur and doesn't work!
|
|
|
|
|
The blur event fires when focus is lost. By default, a div element cannot have the focus in the first place so it can not be lost.
If you give the div a tabindex attribute, it will be able to accept focus:
<div id="divid" tabindex="0">Test content here</div>
then attach focus and blur event handlers:
document.getElementById("divid").onfocus = function() {
alert('focus is hit');
}
document.getElementById("divid").onblur = function() {
alert('blur is hit');
}
Hope this helps !!
Regards,
Praneet.
|
|
|
|
|
Hopefully, I am posting on correct forum.
I have a report with a parameter called loc.
The intended purpose of the report is to allow users to select a location from the dropdownlist and then records associated with that location are displayed to the users.
The dropdownlist is getting populated with values just fine.
However, when I select a location from the dropdownlist, I get an error that says:
Value cannot be null. Parameter name: reportParameters
Everything works fine when I pass a value as textbox but not as dropdown.
Any ideas what I am doing wrong?
Below are relevant code.
'---Dropdownlist control
<asp:Panel runat="server" ID="pnlLoc" Font-Names="Calibri" BorderStyle="Solid" BorderWidth="1" Style="margin: 0 auto; width:300px;">
<table>
<tr>
<td>
<asp:Label runat="server" ID="lblLoc" Text="Location: " />
</td>
<td>
<asp:DropDownList runat="server" ID="ddLoc" DataSourceID="dslocator6" AutoPostBack="True">
</asp:DropDownList>
</td>
</tr>
</table>
</asp:Panel
--Report viewer control
<rsweb:ReportViewer ID="ReportViewer1" runat="server" AsyncRendering="true" SizeToReportContent="true" Font-Names="Arial"
Height="675px" Width="750px">
<LocalReport EnableExternalImages="true" ReportPath="">
</LocalReport>
</rsweb:ReportViewer></center>
<asp:ObjectDataSource ID="LOC" runat="server" SelectMethod="GetData" TypeName="ManageReportsTableAdapters.searchBylocationsTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="ddLoc" Name="Location" DefaultValue=" " />
</SelectParameters>
</asp:ObjectDataSource>
--This code populates the ddLoc dropdownlist
Protected Sub btnLoc_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnLoc.Click
ReportViewer1.LocalReport.ReportPath = ""
pnlLoc.Visible = True
which.Value = "P"
dslocator6.SelectCommand = "SELECT location FROM Locations ORDER BY [location]"
ddLoc.DataTextField = "location"
ddLoc.DataValueField = "location"
End Sub
Sub Run_Report(ByVal sel As String)
ReportViewer1.Reset()
ReportViewer1.LocalReport.DataSources.Clear()
Dim params(0) As ReportParameter
ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("locs", LOC.ID))
ReportViewer1.LocalReport.ReportPath = "locations.rdlc"
ReportViewer1.LocalReport.Refresh()
params(0) = New ReportParameter("loc", sel, False)
ReportViewer1.LocalReport.SetParameters(params) '<-- error points to this line
End Sub
I have been stuck on this for two days. Your assistance is greatly appreciated.
|
|
|
|
|
This means sel is null. If you debug you should find the issue.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
<asp:DropDownList runat="server" ID="ddLoc" DataSourceID="dslocator6" AutoPostBack="True">
</asp:DropDownList>
in your dropdownlist add listitems
<asp:listitem value="location">Location
|
|
|
|
|
Hi All, i'm after a bit of advice on the homepage of my app there is one particular section (Repeater) that queries the DB to provide a high level overview of the latest version of an application. Loading the data into this repeater is having an impact on the load time of the homepage so my thought on this is to is to add a checkbox to the page and on the initial page load do not populate the repeater but if the user checks the checkbox to display the data then go an query the DB to populate the repeater. Aside from only loading this data on request what other way could I control the populating of this repeater so that is not impacting performance?
|
|
|
|
|
i am beginner in asp.net so please recommend a book and articles please
|
|
|
|
|
|
|
wrox professional asp net 4 in c# and vb.
|
|
|
|
|
|
|
AM trying to integrate an online payment system, where the secure payment gateway will send a notification to a specified URL on my site - I have given a generic handler (.ashx) address. I can read the data they send (it's a simple POST), but they require that I send back:
a notification with a response of: "HTTP/1.1 200 OK".
I am not sure what they want... Is a simple
context.Response.ContentType = "text/plain"
context.Response.Write("HTTP/1.1 200 OK")
enough? Perhaps necessarily preceded with
context.Response.StatusCode = 200
?
Or is something more sophisticated required, along the lines of
Dim req As System.Net.HttpWebRequest = System.Net.WebRequest.Create("https://secure-gateway-url")
req.Method = "POST"
req.ContentType = "application/x-www-form-urlencoded"
req.Accept = "HTTP/1.1 200 OK" ?????
req.Headers .Add ( ?????
Dim param As Byte() = context.Request.BinaryRead(HttpContext.Current.Request.ContentLength)
Dim strRequest As String = Encoding.ASCII.GetString(param)
req.ContentLength = strRequest.Length
Dim streamOut As System.IO.StreamWriter = New System.IO.StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII)
streamOut.Write(strRequest)
streamOut.Close()
with what needed at the lines flagged ????
I’d be very grateful for any advice... thanks
|
|
|
|
|
|
Thanks - Google doesn't like me, I've decided I did try and Google this myself....
|
|
|
|
|
I've written that before years ago, it was just easier for me to find it through search and post a link. Took me a while to find the right one.
|
|
|
|
|
i have a project where the client has to place a purchase order, when the client save the purchase order it moves to a aspx web page there the purchase order is displaced as image file, with two button one to generate PDF and the next To Send EMAIL
i can generate a pdf when pdf button is clicked and it get downloaded when opening the pdf file its someother pdf file.i mean the generated pdf is not getting download insist of that another purchased order pdf details is seen but with current file name. i dont know what i did work in my coding, my coding is
Inherits System.Web.UI.Page
Private obj As New SqlHelper
Private _i As Integer = 1
Private att As String
Private PONO1 As Integer
Private pat As String
Private Att_ As String
'Private MailPoId As String
'Private objApp As Outlook.Application = Nothing
'Private objMail As Outlook.MailItem = Nothing
'Private Declare Function ShellExecute Lib _
' "shell32.dll" Alias "ShellExecuteA" _
' (ByVal hwnd As Long, _
' ByVal lpOperation As String, _
' ByVal lpFile As String, _
' ByVal lpParameters As String, _
' ByVal lpDirectory As String, _
' ByVal nShowCmd As Long) As Long
'Private Const SW_SHOW As Integer = 1
Protected Sub btnPdf_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPdf.Click
Dim warnings As Warning() = Nothing
Dim streamids As String() = Nothing
Dim mimeType As [String] = Nothing
Dim encoding As [String] = Nothing
Dim extension As [String] = Nothing
Dim bytes As [Byte]() = Nothing
Dim Folder As String
bytes = ReportViewer1.LocalReport.Render("PDF", "", mimeType, encoding, extension, streamids, warnings)
Dim str As String = Session("POrderNO")
'Folder = ' & DateTime.Now.ToString("dd-MM-yyyy")
'If Folder = vbNullString Then
' lblPdf.Text = "Please set the Pdf path"
' Exit Sub
'End If
Folder = Server.MapPath("~\PDFDownload\PO")
Dim di As DirectoryInfo = New DirectoryInfo(Folder)
Dim path As String
Dim fs As FileStream
Dim data As Byte()
If di.Exists Then
If Not File.Exists(Folder & "\" & str & ".pdf") Then
path = Folder & "\" & str & ".pdf"
Session("MailId") = path
fs = New FileStream(path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite)
data = New Byte(fs.Length - 1) {}
fs.Write(bytes, 0, bytes.Length)
fs.Close()
End If
Else
di.Create()
If Not File.Exists(Folder & "\" & str & ".pdf") Then
path = Folder & "\" & str & ".pdf"
Session("MailId") = path
fs = New FileStream(path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite)
data = New Byte(fs.Length - 1) {}
fs.Write(bytes, 0, bytes.Length)
fs.Close()
di.Refresh()
End If
End If
'
'Session("MailId") = str & ".pdf"
'Dim paths As String = Server.MapPath("~/PDFD/Uploads/")
Dim fName As String = Server.MapPath("~\PDFDownload\PO\" & str & ".pdf")
Dim fi As New FileInfo(fName)
Dim sz As Long = fi.Length
Response.ClearContent()
Response.ContentType = "Application/pdf"
Response.AddHeader("Content-Disposition", String.Format("attachment; filename = {0}", System.IO.Path.GetFileName(fName)))
Response.AddHeader("Content-Length", sz.ToString("F0"))
Response.TransmitFile(Server.MapPath("~\PDFDownload\PO\" & str & ".pdf"))
Response.End()
End Sub
|
|
|
|