|
Well gave you direction but cant fix all here as it wont run. You need to debug and identify the issue. check if you really have data coming from SP outout in debug
modified 20-Sep-20 21:01pm.
|
|
|
|
|
Thank u so much vinod, i have modified the code a little and its perfectly working now.Thank u for ur time.
|
|
|
|
|
Hi,
I want when I enters information in the field, then the title of the field goes over the field.
Herre is my code:
@Html.TextBoxFor(model => model.FirstName, new { @placeholder = "FIRSTNAME", @class = "adresse-input"})
so in the field we have the text "FIRSTNAME", my purpose is when i enters information in this field, the text "FIRSTNAME" goes over the field.
And as long as the client has nothing to enter in a field, then the title remains in the field.
I search a lot if there is a trick to add in TextBoxFor to do that but i didn't find!
Thanks a lot
|
|
|
|
|
Have you looked into CSS for your class for placeholder? Below is something similar you are looking for -
Placeholder for textbox[^]
modified 20-Sep-20 21:01pm.
|
|
|
|
|
Are you looking for something like this?
Float Labels with CSS | CSS-Tricks[^]
If not, then you'll need to explain what you mean by "goes over the field".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello,
I would like to show error when is some of radion buttons is not checked. This is the code:
<pre><div class="floatLeft ml_15">
<asp:Literal ID="litPatientTypeO9" runat="server"></asp:Literal> *
<br />
<asp:RadioButton ID="rbtnNewO9" runat="server" GroupName="PatientTypeO9" CssClass="checkBox" />
<br />
<asp:RadioButton ID="rbtnRecidedO9" runat="server" GroupName="PatientTypeO9" CssClass="checkBox" />
<br />
<asp:RadioButton ID="rbtnUnsucessfulyTreatedO9" runat="server" GroupName="PatientTypeO9" CssClass="checkBox" />
<br />
<asp:RadioButton ID="rbtnTreatedAfterBrakeO9" runat="server" GroupName="PatientTypeO9" CssClass="checkBox" />
<br />
<asp:RadioButton ID="rbtnMovedO9" runat="server" GroupName="PatientTypeO9" CssClass="checkBox" />
<br />
<div id="divOtherType09" runat="server" class="floatLeft" style="padding-top: 3px;">
<asp:RadioButton ID="rbtnOtherTypeO9" runat="server"
GroupName="PatientTypeO9" OnCheckedChanged="rbtnrbtnOtherTypeO9_CheckedChanged" AutoPostBack="true" CssClass="checkBox" />
</div>
<div class="floatLeft">
<uc1:TextBoxControl ID="txtOtherTypeO9" runat="server" />
</div>
</div>
So, all of this radio buttons are not checked and if they stay empty I like to show error message to user so must choose one.
Thank you
|
|
|
|
|
|
Hello
After adding MSSQLLocalDB and ProjectsV13 servers to my Web project which is based on the Register.aspx and Logon.aspx files in Microsoft's WebFormsIdentity template, I have the following in my Web.config file:
<pre><?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-WebFormsIdentity-20190319020136.mdf;Initial Catalog=aspnet-WebFormsIdentity-20190319020136;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<authentication mode="None"/>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.6.1"/>
<httpRuntime targetFramework="4.6.1"/>
<pages>
<namespaces>
<add namespace="System.Web.Optimization"/>
</namespaces>
<controls>
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
</controls>
</pages>
<membership>
<providers>
<!--
ASP.NET Membership is disabled in this template. Please visit the following link https://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
-->
<clear/>
</providers>
</membership>
<profile>
<providers>
<!--
ASP.NET Membership Profile is disabled in this template. Please visit the following link https://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
-->
<clear/>
</providers>
</profile>
<roleManager>
<!--
ASP.NET Membership Role is disabled in this template. Please visit the following link https://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
-->
<providers>
<clear/>
</providers>
</roleManager>
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
<providers>
<add name="DefaultSessionProvider"
type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
connectionStringName="DefaultConnection"/>
</providers>
</sessionState>
</system.web>
etc
I am interested in enabling ASP.NET Membership, ASP.NET Membership Profile, and ASP.NET Membership Role. I have visited the link provided by Microsoft but it doesn't tell me much and seems outdated. For ASP.NET Membership, I am proposing:
<membership>
<providers>
<clear />
<add
name="Net SqlClient Data Provider"
type="System.Web.Security.SqlMembershipProvider" 'not sure of the type for my own project: where do I find that information?
connectionStringName="MySqlConnection" 'MSSQL.LocalDB?
applicationName="WebFormsIdentity"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"
passwordFormat="Hashed" />
</providers>
</membership>
but have no idea about how to enable Membership Profile or ASP.NET Membership Role.
Thank you for any advice.
|
|
|
|
|
|
No. Because most people don't download random zip files.
If you want us to look at code (and I'm assuming you do) copy'n'paste it into your question, enclosed in pre tags:
<pre lang="cs">if ( x == y)
i = 6;</pre> Will give you:
if (x == y)
i = 6; You can add the tags via the "code" widget above the edit textbox.
And tell us where the error occurs, and copy the error message.
Just throwing a zip up on a dodgy download site and expecting us to download it, examine the content and work out where the problem might be is a bad idea ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Have you looked at my example ?
|
|
|
|
|
Have you read OGs response about downloading random zip files?
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Quote: Just throwing a zip up on a dodgy download site and expecting us to download it, examine the content and work out where the problem might be is a bad idea ...
Just because it's easy for you to do, doesn't mean it's a good idea.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
This is my learning project in which I wrapped Angular 7 in .Net Core. I'm in the process of preparing the project to run in a Docker Container and connect to MongoDB that runs in a Docker Container. So I had rewrite the project so it's knows if it's running in a Docker container or just running in IIS, and for development and production environments.
Accomplishments:
Figured out how to edit the Dockerfile, and inject 2 PFX files into the .Net Core container for portable SSL.
Figured out the port mapping on 5000, 5001, 44367, and how not to load Kestrel for development, yet load it for production.
I got my Docker-Compose dialed in to create MongoDB V4.08, the static data volume, bridge network to talk to the .Net Core container.
Created a a dual appSettings.json for production and development.
Got the user secrets going, but haven't figured out the Kestrel part yet.
So far so good. But I'm getting some crazy erratic results ...
It's like it's stuck in a build and won't update.
The project always displays data from a mongo database on on another server from previous builds.
I can't get the connection string to work with the user name and password under SHA-1 using the C# Mongo Drivers, but it works without credentials, I think that's my problem.
I go to debug to confirm that it detected the Docker Container, but I can't hit the break-point, yet project.dll symbols are loaded.
It's just gotten to the point where I'm going around in circles, and need to confirm some code before I change good code.
On the data, I can Roto3T into each Mongo and see the data I created which is all different.
In startup, I read the appSettings.development.json file and add 1 more option called IsContained, which is what I was trying to hit in the break-point. If I set this extra option here, I should be able to read it in my DBContext?
What I did was try and read the Environment Variable since I wasn't able to confirm the option. But would SETTINGS contain that option?
services.Configure<Settings>(Configuration.GetSection("Settings"));
services.Configure<Settings>(
options =>
{
options.MongoDB.Connection = Configuration.GetSection("MongoDB:Connection").Value;
options.MongoDB.Database = Configuration.GetSection("MongoDB:Database").Value;
options.MongoDB.Container = Configuration.GetSection("MongoDB.Container").Value;
options.MongoDB.IsContained = Configuration["DOTNET_RUNNING_IN_CONTAINER"] != null;
}
);
private readonly IMongoDatabase _database = null;
public DbContext(IOptions<<code>Settings</code>> appSettings)
{
bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_RUNNING_IN_CONTAINER"), out var isDocker);
Console.Write("DBContext IsDocker = " + isDocker);
var client = new MongoClient(isDocker ? appSettings.Value.MongoDB.Container : appSettings.Value.MongoDB.Connection);
_database = client.GetDatabase(appSettings.Value.MongoDB.Database);
}
This is for a sanity check. I had to rewrite this to accommodate containers and my portable SSL certifcates. So if I use Kubernetes in the future, more .Net app containers can be spawned with SSL self contained. Online research says I need to use Kestrel for this and bind the port with the certificate. This crashed in development when trying to use the localhost certificate but now it works using the dev-certs certificate that is registered. Haven't tried it yet in Production using a real certificate, that comes when I fix the other issues first. But I will have more Kestrel questions soon. Any help or pointers on this would be appreciated.
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("secrets.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appSettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}.json", optional: false, reloadOnChange: true)
.AddJsonFile($"certificate.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}.json", optional: false, reloadOnChange: true)
.Build();
<pre>
var appSettings = config.GetSection("Settings").Get<Settings>();
var dbSecrets = config.GetSection("Database").Get<DbSecrets>();
var env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_RUNNING_IN_CONTAINER"), out var isDocker);
var host = CreateWebHostBuilder(args).Build();
if (env == "Production" && isDocker)
{
var certificateSettings = config.GetSection("certificateSettings");
var certificateFileName = certificateSettings.GetValue<string>("filename");
var certificatePassword = certificateSettings.GetValue<string>("password");
var certificate = new X509Certificate2(certificateFileName, certificatePassword);
var builder = new WebHostBuilder()
.UseKestrel(
options =>
{
options.AddServerHeader = false;
options.Listen(IPAddress.Loopback, 44367, listenOptions =>
{
listenOptions.UseHttps(certificate);
});
}
)
.UseConfiguration(config)
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<startup>()
.Build();
builder.Run();
}
host.Run();
}
Note:
Visual Studio does an OK job in getting your project into Docker for testing, but left out so many factors.
And the Internet is jammed pack with outdated information on the topic.
All the Angular stuff seem to work fine, and I think it's all .Net Core related.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Well I figured out a few things today.
My crazy issues came from the Angular wrapped in .Net Core project image that I started with.
There's a file called app.constants in Angular and a class called Configuration that is used to set the url to services in Angular to call .Net Core API's, and all the calls where going to my production server. Thus the wrong data. I just changed that file and now I can hit the breakpoints. Now I'm calling API services in the Dockerized container; I think I can fix it now that I can walk the code. It's a start in the right direction now.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I got the SSL/TLS working today with a self contained certificate within the project running in Docker for Windows, and it connects to my MongoDB as well. It took lots of research on Kestrel and how it works. The part that sucks is that all of the examples are for developing and not production and actual deployment. Just finding the nomenclature for searching was difficult as well. But it involves certificate pinning and how to run a container with Kestrel and https.
So this segways to another question that I will post.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
hi all
this is my html and style its
<title>why?
<style>
div {
background:#eadddd;
border:2px solid navy;
height:60px;
width:300px;
margin-top:5px;
}
</style>
if run in my browser
find 3 div
I want 1 ?
sometimes if delete
i get one div
thanks for help
ashraf
ashraf
-- modified 5-Apr-19 7:22am.
|
|
|
|
|
where is the html?
modified 20-Sep-20 21:01pm.
|
|
|
|
|
Can someone please help me understand why images is not displaying on this page?
I have a calendar that displays various events with appropriate pictures.
On the calendar itself, a small image is displayed (this works fine).
Here is the code for that:
<body>
<form id="Form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<dc:DataCalendar id="cal1" runat="server"
DayField="EventDate" OnVisibleMonthChanged="MonthChange"
Height="295px" Width="275px" BorderColor="#EFEFDE"
DayNameFormat="Shortest" SelectedDate="2012-11-17">
<DayStyle HorizontalAlign="Left" VerticalAlign="Top"
Font-Size="7" Font-Names="Arial" BackColor="white" />
<OtherMonthDayStyle BackColor="white" ForeColor="white" />
<ItemTemplate>
<a href='#' OnClick="javascript:window.open('admin/eventDetails.aspx?id=<%# Container.DataItem("EventID") %>','EventsDetail','width=800,height=600;toolbar=no;');" & ">
<img alt="" src='images/<%# Container.DataItem("CategoryImage") %>' height="12" width="12" align="absmiddle" border="0" /><br />
<font color='<%# Container.DataItem("CategoryColor") %>'>
<%# Container.DataItem("EventTitle") %>
</font>
</a>
</ItemTemplate>
<TitleStyle BackColor="#CEDFCE" Font-Bold="True" />
</dc:DataCalendar>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
en you on any given date, you are taken to the details page of that part event.
This is where a larger image is supposed to be displayed.
However, the image is not displaying. It is not even showing the little icon when picture is not present.
What am I doing wrong?
Here is that code for the eventDetails page.
Thanks in advance for your assistance.
//VB
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not IsPostBack Then
If (Not (Request.QueryString("id")) Is Nothing) Then
Session("apomember") = Request.QueryString("id")
End If
BindGrid()
End If
End Sub
Private Sub BindGrid()
Dim myConnectionstring As String = ConfigurationManager.ConnectionStrings("test").ConnectionString
Dim myConn As New SqlConnection(myConnectionstring)
myConn.Open()
Dim cmd As New SqlCommand("SELECT e.EventID, e.EventTitle, e.EventDescription, e.EventDate, c.CategoryTitle, c.CategoryImage, c.CategoryColor " &
"FROM Events e INNER JOIN Categories c ON e.EventCategory = c.CategoryID where c.CategoryID = @apoid ORDER BY e.EventDate", myConn)
cmd.Parameters.AddWithValue("@apoid", Session("apomember"))
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.Read() Then
txtTitle.Text = dr("EventTitle").ToString()
txtTitle.Text = dr("EventDate").ToString()
txtDate.Text = dr("EventDescription").ToString()
txtDescription.Text = dr("EventTitle").ToString()
txtCategory.Text = dr("CategoryImage").ToString()
End If
myConn.Close()
End Sub
//Markup
<form id="form1" runat="server">
<div>
<a href="#" id="logo"><img src="/images/skin1/owerri_logo.jpg" Height="245" Width="322"alt="Owerri Family Union" border="0" title="Owerri Family Union" /></a> Owerri Family Union, Atlanta, GA - USA
</div>
<hr />
<table>
<tr style="margin-top:10px;">
<td>Event Title:</td>
<td><asp:Label id="txtTitle" runat="server"></asp:Label></td>
</tr>
<tr style="margin-top:10px;">
<td>Event Date:</td>
<td><asp:Label id="txtDate" runat="server"></asp:Label></td>
</tr>
<tr style="margin-top:10px;">
<td>Event Description:</td>
<td><asp:Label id="txtDescription" runat="server"></asp:Label></td>
</tr>
<tr style="margin-top:10px;">
<td>Category:</td>
<td>
<asp:Image ID="Image1" ImageUrl='/admin/memberPhotos/ & <%# Eval("CategoryImage") %>' runat="server" Height="100" Width="100" />
<asp:Label id="txtCategory" runat="server"></asp:Label></td>
</tr>
</table>
</form>
modified 3-Apr-19 15:56pm.
|
|
|
|
|
samflex wrote:
<asp:Image ID="Image1" ImageUrl='/admin/memberPhotos/ & <%# Eval("CategoryImage") %>' runat="server" Height="100" Width="100" />
You can't mix static and data-bound content in a server property like that. Try:
<asp:Image ID="Image1" ImageUrl='<%# Eval("CategoryImage", "/admin/memberPhotos/{0}") %>' runat="server" Height="100" Width="100" />
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard,
That didn't work. It still displays blank image but this *seems* to have worked:
age1.ImageUrl = "~/images/" & dr("CategoryImage").ToString()
Thanks for your help as always sir.
|
|
|
|
|
The one that didn't work is pointing to: /admin/memberPhotos/{image}
The one that did work is pointing to: ~/images/{image}
So the markup would need to look something like:
<asp:Image ID="Image1" ImageUrl='<%# Eval("CategoryImage", "~/images/{0}") %>' runat="server" Height="100" Width="100" />
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
No sir, I have the image on both folders.
I was not intending to have them on both folders but I just wanted to see if any of those would work.
|
|
|
|
|
Hello,
I'm trying to do one page with two listboxes that filers one grid.
The only requirement is that the selection made by the user must be reflected in the URL so that it can be sent by mail to colleagues with the selection already made
The problem is that Load event fires twice.
First time all parameters are transmitted correctly.
The second time the whole QueryString disappears!!
ASPX Directive:
<%@ Page
Language="vb"
uiCulture="en-US"
culture="de-DE"
MasterPageFile="XTAB_WO.master"
AutoEventWireup="false"
CodeFile="LC1vsLC2.vb"
Inherits="LC1vsLC2"
ClientIDMode="Predictable"
%>
ASPX Code:
<asp:listbox clientidmode="Static" id="LstTipo" style="width:150px;height:100px;" runat="server" datasourceid="SqlDataSource2" datatextfield="FLD_RESULTADO" datavaluefield="FLD_RESULTADO">
<asp:listbox clientidmode="Static" id="LstTMA" style="width:150px;height:100px;" runat="server" datasourceid="SqlDataSource4" datatextfield="FLD_MOD3" datavaluefield="FLD_MOD3">
<dx:ASPxGridView ID="gridview1" runat="server" AutoGenerateColumns="true" DataSourceID="SqlDataSource1">
</dx:ASPxGridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyCCnn %>"></asp:SqlDataSource>
<asp:Button ID="Button1" runat="server" Text="Select" style="width:150px;" OnClientClick="Populate();"/>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:hacheConnectionString %>"
SelectCommand="select '(ALL)' FLD_RESULTADO UNION ALL select distinct FLD_RESULTADO from XXXXXXXXXXXXX">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:hacheConnectionString %>"
SelectCommand="select '(ALL)' FLD_MOD3 UNION ALL select distinct FLD_MOD3 from XXXXXXXXXXXXX">
</asp:SqlDataSource>
<script type="text/javascript" language="javascript">
function removeParam(key, sourceURL) {
var rtn = sourceURL.split("?")[0],
param,
params_arr = [],
queryString = (sourceURL.indexOf("?") !== -1) ? sourceURL.split("?")[1] : "";
if (queryString !== "") {
params_arr = queryString.split("&");
for (var i = params_arr.length - 1; i >= 0; i -= 1) {
param = params_arr[i].split("=")[0];
if (param === key) {
params_arr.splice(i, 1);
}
}
rtn = rtn + "?" + params_arr.join("&");
}
return rtn;
}
function Populate() {
var tma = document.getElementById("LstTMA");
var tipo = document.getElementById("LstTipo");
var fe = "";
var miurl="";
var miurlIni="";
var valor = "";
miurlIni = window.top.location.href + "?";
if (tipo.selectedIndex >= 0) {
var selectedtipo = tipo.options[tipo.selectedIndex].text;
miurl = removeParam("tipo", miurl);
valor = (selectedtipo == "(ALL)") ? '0' : selectedtipo;
miurl = miurl + "&tipo=" + valor.replace(" ","_");
}
if (tma.selectedIndex >= 0) {
var selectedtma = tma.options[tma.selectedIndex].text;
miurl = removeParam("tma", miurl);
valor = (selectedtma == "(ALL)") ? '0' : selectedtma;
miurl = miurl + "&tma=" + valor;
}
window.top.location.href = miurlIni + miurl.substring(1,999);
}
</script>
CODE-BEHIND:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim q As String, q_count As String, x As Integer, NumR As Long
Dim dv As Object
Dim mpContentPlaceHolder As ContentPlaceHolder
Dim ddlRp As ASPxRoundPanel
Dim LstTipo As ListBox, StTipo As String
Dim LstTMA As ListBox, StTma As String
mpContentPlaceHolder = CType(Master.FindControl("ContentHolder"), ContentPlaceHolder)
If Not mpContentPlaceHolder Is Nothing Then
ddlRp = CType(mpContentPlaceHolder.FindControl("ASPxRoundPanel3"), ASPxRoundPanel)
If Not ddlRp Is Nothing Then
LstTipo = CType(ddlRp.FindControl("LstTipo"), ListBox)
LstTMA = CType(ddlRp.FindControl("LstTMA"), ListBox)
End If
End If
If Request.QueryString.Count > 0 AndAlso ((Not Request.QueryString("pais") Is Nothing) Or (Not Request.QueryString("y4m2d2") Is Nothing) Or (Not Request.QueryString("tipo") Is Nothing) Or (Not Request.QueryString("tma") Is Nothing)) Then
StTipo = "" : StTma = "" ': Sty4m2d2 = ""
If Not (Request.QueryString("tipo") Is Nothing) AndAlso Request.QueryString("tipo").ToString() <> "" Then
If Request.QueryString("tipo") = "0" Then
LstTipo.SelectedValue = "(ALL)"
StTipo = ""
Else
LstTipo.SelectedValue = Replace(Request.QueryString("tipo"), "_", " ")
StTipo = " AND FLD_RESULT='" & Replace(Request.QueryString("tipo"), "_", " ") & "'"
End If
End If
If Not (Request.QueryString("tma") Is Nothing) AndAlso Request.QueryString("tma").ToString() <> "" Then
If Request.QueryString("tma") = "0" Then
LstTMA.SelectedValue = "(ALL)"
StTma = ""
Else
LstTMA.SelectedValue = Replace(Request.QueryString("tma"), "_", " ")
StTma = " AND FLD_MOD3='" & Replace(Request.QueryString("tma"), "_", " ") & "'"
End If
End If
q = "SELECT " & StFieldsQuery & " FROM V_BUDA_LC1vsLC2 WHERE 1=1 " & StTipo & StTma '& Sty4m2d2 '& " ORDER BY FLD_ID"
q_count = "SELECT count(*) NumR FROM V_BUDA_LC1vsLC2 where 1=1 " & StTipo & StTma '& Sty4m2d2
SqlDataSource11.SelectCommand = q_count
dv = CType(SqlDataSource11.Select(DataSourceSelectArguments.Empty), DataView)
NumR = CType(dv.Table.Rows(0)(0), Integer)
If (NumR > 0) Then
SqlDataSource1.SelectCommand = q
gridview1.Visible = True
LblNoData.Visible = False
Else
gridview1.Visible = False
LblNoData.Visible = True
End If
Else
gridview1.Visible = True
LblNoData.Visible = False
q = "SELECT * FROM V_BUDA_LC1vsLC2 WHERE 1=0"
SqlDataSource1.SelectCommand = q
End If
Page.DataBind()
End Sub
|
|
|
|
|
|