|
I have 2 RadioButtonList
rdBtnPersonel_Status and rdBtnPersonel_FoodStatus
i wrote :
<asp:RadioButtonList runat="server" ID="rdBtnPersonel_Status" RepeatDirection="Horizontal" Width="100%"
DataSourceID="ObjDsPersonelStatuses" onclick="javascript:radioButtonListOnClick('<%#((RadiobuttonList)Container.FindControl("rdBtnPersonel_Status")).ClientID %>');">
</asp:RadioButtonList>
i want when i click rdBtnPersonel_Status , if the valu eual A the rdBtnPersonel_FoodStatus be disabled. (with javascript)
can any body help me?
|
|
|
|
|
I tried to change the flash banner text from 50% to 60% and its only show 60% in Desktops not in mobile.
Please let me know if any one have the solution detail and steps of how to fix it
modified 4-Feb-14 4:01am.
|
|
|
|
|
In if else structure when null arguments are passed to two string variables then it always hit the condition when i have set Var1 != "" && Var2 != "" why ? since nulls are passed to both then why it hits this condition ?
code:
public ActionResult ShowCalTextBox(String DateFrom, String DateTo)
{
if (DateFrom != "" && DateTo == "")
{
IEnumerable<GetEmpRec_DateResult> EmpRec_DateFrom = DataContext.GetEmpRec_Date(DateFrom, null).ToList();
ViewBag.Dates = "Records for"+" "+ DateFrom ;
return View(EmpRec_DateFrom);
}
else if (DateFrom == "" && DateTo != "")
{
IEnumerable<GetEmpRec_DateResult> EmpRec_DateTo = DataContext.GetEmpRec_Date(null, DateTo).ToList();
ViewBag.Dates = "Records for" + " " + DateTo;
return View(EmpRec_DateTo);
}
else if (DateFrom != "" && DateTo != "")
{
IEnumerable<GetEmpRec_DateResult> EmpRec_ByDate = DataContext.GetEmpRec_Date(DateFrom, DateTo).ToList();
ViewBag.Dates = "Records from" + " " + DateFrom +" "+"to"+" "+DateTo;
return View(EmpRec_ByDate);
}
else if (DateFrom == "" && DateTo == "")
{
IEnumerable<GetEmpRec_DateResult> EmpRec_Default = DataContext.GetEmpRec_Date(null, null).ToList();
ViewBag.Dates = "No date selection";
return View(EmpRec_Default);
}
return View();
}
it hits this one when i first browse this action or run this action.
else if (DateFrom == "" && DateTo != "")
|
|
|
|
|
null isn't "" (empty string)!!!
You should use String.IsNullOrEmpty(string_var) to check for both...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
How can I catch and retry if I got a duplicate keys error?
If InsertProviderMasterCommand failed due to dups go to GenerateKeys
and try again???
Try
GenerateKeys(myRow)
If InsertProviderMasterCommand(myRow) = True Then
MasterInsertCount += 1
End If
Catch ex As Exception
Throw ex
End Try
|
|
|
|
|
If you want to retry than why waste on try-catch block - do a simple while loop around the insert part...
bool bDo = true;
while(bDo)
{
GenerateKeys(myRow);
if(InsertProviderMasterCommand(myRow))
{
MasterInsertCount += 1;
bDo = false;
}
}
(I know you are a VB fan - but I can't bring myself to write that kind of code - sorry )
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Hi Friends,
I want to know some good books to refer for "ASP.Net best practices" ,I have googled the same and there are so many books available.So can any of you tell me some good book to refer depending upon your reading experiences.
Regards
|
|
|
|
|
|
Snehasish_Nandy wrote: It's my personal choice But it has nothing to do with ASP.NET.
Veni, vidi, abiit domum
|
|
|
|
|
Check this one[^] but the version is 3.5 & out of print. Book was from Apress.
Why only Books? Education Needed[^]
In Codeproject you could find more than bunch of articles on ASP.NET Best practices.
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
You have all the answers here:
ASP.Net Best Practices[^]
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I have this code is web.config
<anonymousIdentification enabled="true"/>
<profile enabled="true">
<properties>
<add name="FName" type="String" allowAnonymous="true"/>
</properties>
</profile>
<authentication mode="Windows" />
and this code is default.aspx.cs page
Profile.FName = TextBox1.Text;
Response.Write("Your name is: " + Profile.FName);
after runing the page, when I enter a data to text and click on button it gives me an error and this is error:
this.SetPropertyValue("FName", value);
and on the page error is:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
So, please help me to solve this problem.
|
|
|
|
|
Hi,
i didn't find any button on that,
i have run the code , i didn't find any error.
can you please produce the full and your requirement plz.
Thanks
|
|
|
|
|
You haven't configured the database connection correctly. The default settings will try to use a local instance of SQL Express to open a database called aspnetdb.mdf in your application's App_Data folder. If you don't have SQL Express installed, then the connection will not work.
To specify the database to connect to, you'll need to define a custom provider. You'll also need to run aspnet_regsql against the database to create the objects required to support the SqlProfileProvider .
Have a look at this article for more information: Implementing User Profiles in ASP.NET - A Beginner's Guide[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Kindly help me,
actually i am learning mvc
so which is best ,like i want to use entity framework with stored procedure ,kindly help
|
|
|
|
|
|
|
I have a listview control in that i put radiobutton but i can't find when the radio button is clicked..
my code is here
<asp:ListView ID="ListView2" runat="server" ItemPlaceholderID ="BrandName" OnSelectedIndexChanged="ListView2_SelectedIndexChanged" OnSelectedIndexChanging="ListView2_SelectedIndexChanging" OnItemCommand="ListView2_ItemCommand">
<LayoutTemplate >
<ul>
<asp:PlaceHolder runat ="server" id="BrandName"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li><asp:RadioButton ID="rodB1" runat="server" GroupName="G3" OnCheckedChanged="rodB1_CheckedChanged" AutoPostBack="True" /><%#Eval("Brand")%></li>
</ItemTemplate>
</asp:ListView>
|
|
|
|
|
Hi,
I think to view the controls in the list box or gridview, we need to provide some data source.
Here i have tried some code to view the radio button control in the list view.
<asp:ListView ID="lv1" GroupItemCount="3" runat="server" DataKeyNames="1" >
<LayoutTemplate>
<fieldset>
<legend>MyGroups</legend>
<asp:PlaceHolder runat="server" ID="groupPlaceholder"></asp:PlaceHolder>
</fieldset>
</LayoutTemplate>
<GroupTemplate>
<fieldset>
<legend>Individual Group</legend>
<asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
</fieldset>
</GroupTemplate>
<GroupSeparatorTemplate>
</GroupSeparatorTemplate>
<EmptyDataTemplate>No records present.</EmptyDataTemplate>
<ItemTemplate>
<asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack ="true" value='<%# Eval(1)%>' /><%# Eval("Text1")%>
</ItemTemplate>
</asp:ListView>
**********************************************
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
BindListView()
End If
End Sub
Private Sub BindListView()
lv1.DataSource = GetData()
lv1.DataBind()
End Sub
Private Function GetData() As DataTable
Dim dt As New DataTable()
dt.Columns.Add("1", System.Type.[GetType]("System.Int32"))
dt.Columns.Add("Text1", System.Type.[GetType]("System.Int32"))
Dim k As Integer = 0
Dim strTemp As String = 10
For i As Integer = 0 To 11
Dim dr As DataRow = dt.NewRow()
dr("1") = i + 13
dr("Text1") = 10
k += 1
If k = 3 Then
strTemp = 12
k = 0
End If
dt.Rows.Add(dr)
Next
Return dt
End Function
once try this code
I can't provide the answer, but have provide some suggestions.
Prasad Vj
|
|
|
|
|
Soliciting opinions. I'm an ASP.NET dev, and I've got the opportunity to work on a project that will be in ASP.NET MVC, which I know little about. Am I right in thinking that it's a pared-down version of ASP.NET that enforces a design template and offers lots of other syntactic sugar to cover up the inner workings of standard ASP.NET, or is there more to it? I've previously done some Silverlight, but wouldn't choose to do another due to its likely demise. There's no connection between ASP.NET MVC and WPF, right? Thoughts on the future of ASP.NET MVC?
|
|
|
|
|
First take a look at comparisons
WebForms vs. MVC[^]
Difference betweeen ASP.NET WebForms and ASP.NET MVC[^]
woopsydoozy wrote: There's no connection between ASP.NET MVC and WPF, right? You mean Silverlight? Even it's WPF, AFAIK No. Silverlight/WPF's way is XAML. You could use things like WCF, LINQ on both MVC & WPF/SL.
woopsydoozy wrote: Thoughts on the future of ASP.NET MVC? Nowadays people prefer MVC over ASP.NET webforms. And people use MVC with javascript libraries, here couple of articles from CP.
MVC Techniques with jQuery, JSON, Knockout, and C#[^]
ASP.NET MVC 4 with Knockout Js[^]
Simple CRUD Using Backbone.js in ASP.NET MVC Razor[^]
AngularJS Single Page Application with WebAPI and Upida backend[^]
Design and Develop a website using ASP.NET MVC 4, EF, Knockoutjs and Bootstrap : Part - 1[^]
ASP.NET MVC 4 SPA Navigation with Sammy.js[^]
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
I'm still trying to wrap my head around this, so I'm not even sure I will be asking the right question...
I have a method that makes a call to a web service to get a result set. That result set is returned to the caller in Json format.
When the method makes the request to the service, is that an HTTPGET or an HTTPPOST request?
If the answer is it depends, is there a way to distinguish between the 2?
How do I know when I need to include the JsonRequestBehavior.AllowGet argument on my Json call?
public virtual ActionResult ListAjax([DataSourceRequest] DataSourceRequest request)
{
var d = myWebService.GetD(s, c, f);
var dList = d.Select(x => x.DId).ToList();
DataSourceResult result = d.ToDataSourceResult(request);
return Json(result);
}
modified 31-Jan-14 7:15am.
|
|
|
|
|
Hi
When you are calling a method you will mention whether you are doing get or post.
You can make use of Fiddler tool when making webservice call. You will come to know whether you are doing get or post request.
Can you paste the code snippet that is making web service call.
|
|
|
|
|
Thank you for the tip. Using fiddler, I was able to tell that the request was a POST. I just thought there should be some way I should be able to tell by looking at the WSDL.
|
|
|
|
|
By looking at wsdl you will not be able to tell. Wsdl is web service link
|
|
|
|